VERY experimental Nintendo Switch 2 emulator
C++
Services: Continue separation of services into their own folders
purpasmart967933dbe6a0ee
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cppindex 6ca8cb78d4..d85e583737 100644--- a/src/common/logging/backend.cpp+++ b/src/common/logging/backend.cpp@@ -37,6 +37,7 @@ namespace Log {SUB(Service, APT) \SUB(Service, GSP) \SUB(Service, AC) \+ SUB(Service, AM) \SUB(Service, PTM) \SUB(Service, LDR) \SUB(Service, NIM) \diff --git a/src/common/logging/log.h b/src/common/logging/log.hindex d720d7fe0e..5b3a731e9b 100644--- a/src/common/logging/log.h+++ b/src/common/logging/log.h@@ -57,13 +57,14 @@ enum class Class : ClassType {Service_APT, ///< The APT (Applets) serviceService_GSP, ///< The GSP (GPU control) serviceService_AC, ///< The AC (WiFi status) service+ Service_AM, ///< The AM (Application manager) serviceService_PTM, ///< The PTM (Power status & misc.) serviceService_LDR, ///< The LDR (3ds dll loader) serviceService_NIM, ///< The NIM (Network interface manager) service- Service_NWM, ///< The NWM (Network manager) service+ Service_NWM, ///< The NWM (Network wlan manager) serviceService_CFG, ///< The CFG (Configuration) serviceService_DSP, ///< The DSP (DSP control) service- Service_HID, ///< The HID (User input) service+ Service_HID, ///< The HID (Human interface device) serviceService_SOC, ///< The SOC (Socket) serviceService_Y2R, ///< The Y2R (YUV to RGB conversion) serviceHW, ///< Low-level hardware emulationdiff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txtindex bbc2851685..057b8ca0c8 100644--- a/src/core/CMakeLists.txt+++ b/src/core/CMakeLists.txt@@ -39,18 +39,26 @@ set(SRCShle/kernel/vm_manager.cpphle/service/ac_u.cpphle/service/act_u.cpp- hle/service/am_app.cpp- hle/service/am_net.cpp- hle/service/am_sys.cpp+ hle/service/am/am.cpp+ hle/service/am/am_app.cpp+ hle/service/am/am_net.cpp+ hle/service/am/am_sys.cpp+ hle/service/am/am_u.cpphle/service/apt/apt.cpphle/service/apt/apt_a.cpphle/service/apt/apt_s.cpphle/service/apt/apt_u.cpp- hle/service/boss_p.cpp- hle/service/boss_u.cpp- hle/service/cam_u.cpp- hle/service/cecd_s.cpp- hle/service/cecd_u.cpp+ hle/service/boss/boss.cpp+ hle/service/boss/boss_p.cpp+ hle/service/boss/boss_u.cpp+ hle/service/cam/cam.cpp+ hle/service/cam/cam_c.cpp+ hle/service/cam/cam_q.cpp+ hle/service/cam/cam_s.cpp+ hle/service/cam/cam_u.cpp+ hle/service/cecd/cecd.cpp+ hle/service/cecd/cecd_s.cpp+ hle/service/cecd/cecd_u.cpphle/service/cfg/cfg.cpphle/service/cfg/cfg_i.cpphle/service/cfg/cfg_s.cpp@@ -58,8 +66,9 @@ set(SRCShle/service/csnd_snd.cpphle/service/dsp_dsp.cpphle/service/err_f.cpp- hle/service/frd_a.cpp- hle/service/frd_u.cpp+ hle/service/frd/frd.cpp+ hle/service/frd/frd_a.cpp+ hle/service/frd/frd_u.cpphle/service/fs/archive.cpphle/service/fs/fs_user.cpphle/service/gsp_gpu.cpp@@ -75,10 +84,13 @@ set(SRCShle/service/ldr_ro.cpphle/service/mic_u.cpphle/service/ndm_u.cpp- hle/service/news_s.cpp- hle/service/news_u.cpp- hle/service/nim_aoc.cpp- hle/service/nim_u.cpp+ hle/service/news/news.cpp+ hle/service/news/news_s.cpp+ hle/service/news/news_u.cpp+ hle/service/nim/nim.cpp+ hle/service/nim/nim_aoc.cpp+ hle/service/nim/nim_s.cpp+ hle/service/nim/nim_u.cpphle/service/ns_s.cpphle/service/nwm_uds.cpphle/service/pm_app.cpp@@ -152,18 +164,26 @@ set(HEADERShle/result.hhle/service/ac_u.hhle/service/act_u.h- hle/service/am_app.h- hle/service/am_net.h- hle/service/am_sys.h+ hle/service/am/am.h+ hle/service/am/am_app.h+ hle/service/am/am_net.h+ hle/service/am/am_sys.h+ hle/service/am/am_u.hhle/service/apt/apt.hhle/service/apt/apt_a.hhle/service/apt/apt_s.hhle/service/apt/apt_u.h- hle/service/boss_p.h- hle/service/boss_u.h- hle/service/cam_u.h- hle/service/cecd_s.h- hle/service/cecd_u.h+ hle/service/boss/boss.h+ hle/service/boss/boss_p.h+ hle/service/boss/boss_u.h+ hle/service/cam/cam.h+ hle/service/cam/cam_c.h+ hle/service/cam/cam_q.h+ hle/service/cam/cam_s.h+ hle/service/cam/cam_u.h+ hle/service/cecd/cecd.h+ hle/service/cecd/cecd_s.h+ hle/service/cecd/cecd_u.hhle/service/cfg/cfg.hhle/service/cfg/cfg_i.hhle/service/cfg/cfg_s.h@@ -171,8 +191,9 @@ set(HEADERShle/service/csnd_snd.hhle/service/dsp_dsp.hhle/service/err_f.h- hle/service/frd_a.h- hle/service/frd_u.h+ hle/service/frd/frd.h+ hle/service/frd/frd_a.h+ hle/service/frd/frd_u.hhle/service/fs/archive.hhle/service/fs/fs_user.hhle/service/gsp_gpu.h@@ -188,10 +209,13 @@ set(HEADERShle/service/ldr_ro.hhle/service/mic_u.hhle/service/ndm_u.h- hle/service/news_s.h- hle/service/news_u.h- hle/service/nim_aoc.h- hle/service/nim_u.h+ hle/service/news/news.h+ hle/service/news/news_s.h+ hle/service/news/news_u.h+ hle/service/nim/nim.h+ hle/service/nim/nim_aoc.h+ hle/service/nim/nim_s.h+ hle/service/nim/nim_u.hhle/service/ns_s.hhle/service/nwm_uds.hhle/service/pm_app.hdiff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cppnew file mode 100644index 0000000000..57dc1ece72--- /dev/null+++ b/src/core/hle/service/am/am.cpp@@ -0,0 +1,55 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "common/logging/log.h"++#include "core/hle/service/service.h"+#include "core/hle/service/am/am_app.h"+#include "core/hle/service/am/am_net.h"+#include "core/hle/service/am/am_sys.h"++#include "core/hle/hle.h"+#include "core/hle/kernel/event.h"+#include "core/hle/kernel/shared_memory.h"++namespace Service {+namespace AM {++void TitleIDListGetTotal(Service::Interface* self) {+ u32* cmd_buff = Kernel::GetCommandBuffer();+ u32 media_type = cmd_buff[1] & 0xFF;++ cmd_buff[1] = RESULT_SUCCESS.raw;+ cmd_buff[2] = 0;++ LOG_WARNING(Service_AM, "(STUBBED) media_type %u", media_type);+}++void GetTitleIDList(Service::Interface* self) {+ u32* cmd_buff = Kernel::GetCommandBuffer();+ u32 num_titles = cmd_buff[1];+ u32 media_type = cmd_buff[2] & 0xFF;+ u32 addr = cmd_buff[4];++ cmd_buff[1] = RESULT_SUCCESS.raw;+ cmd_buff[2] = 0;++ LOG_WARNING(Service_AM, "(STUBBED) Requested %u titles from media type %u", num_titles, media_type);+}++void Init() {+ using namespace Kernel;++ AddService(new AM_APP_Interface);+ AddService(new AM_NET_Interface);+ AddService(new AM_SYS_Interface);+}++void Shutdown() {++}++} // namespace AM++} // namespace Servicediff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.hnew file mode 100644index 0000000000..063b8bd097--- /dev/null+++ b/src/core/hle/service/am/am.h@@ -0,0 +1,47 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/kernel/kernel.h"+#include "core/hle/service/service.h"++namespace Service {+namespace AM {++/**+ * AM::TitleIDListGetTotal service function+ * Gets the number of installed titles in the requested media type+ * Inputs:+ * 0 : Command header (0x00010040)+ * 1 : Media type to load the titles from+ * Outputs:+ * 1 : Result, 0 on success, otherwise error code+ * 2 : The number of titles in the requested media type+ */+void TitleIDListGetTotal(Service::Interface* self);++/**+ * AM::GetTitleIDList service function+ * Loads information about the desired number of titles from the desired media type into an array+ * Inputs:+ * 0 : Command header (0x00020082)+ * 1 : The maximum number of titles to load+ * 2 : Media type to load the titles from+ * 3 : Descriptor of the output buffer pointer+ * 4 : Address of the output buffer+ * Outputs:+ * 1 : Result, 0 on success, otherwise error code+ * 2 : The number of titles loaded from the requested media type+ */+void GetTitleIDList(Service::Interface* self);++/// Initialize AM service+void Init();++/// Shutdown AM service+void Shutdown();++} // namespace AM+} // namespace Servicediff --git a/src/core/hle/service/am/am_app.cpp b/src/core/hle/service/am/am_app.cppnew file mode 100644index 0000000000..c6fc81bc33--- /dev/null+++ b/src/core/hle/service/am/am_app.cpp@@ -0,0 +1,20 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/am/am.h"+#include "core/hle/service/am/am_app.h"++namespace Service {+namespace AM {++// Empty arrays are illegal -- commented out until an entry is added.+//const Interface::FunctionInfo FunctionTable[] = { };++AM_APP_Interface::AM_APP_Interface() {+ //Register(FunctionTable);+}++} // namespace AM+} // namespace Servicediff --git a/src/core/hle/service/am/am_app.h b/src/core/hle/service/am/am_app.hnew file mode 100644index 0000000000..fd6017d144--- /dev/null+++ b/src/core/hle/service/am/am_app.h@@ -0,0 +1,22 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace AM {++class AM_APP_Interface : public Service::Interface {+public:+ AM_APP_Interface();++ std::string GetPortName() const override {+ return "am:app";+ }+};++} // namespace AM+} // namespace Servicediff --git a/src/core/hle/service/am_net.cpp b/src/core/hle/service/am/am_net.cppsimilarity index 81%rename from src/core/hle/service/am_net.cpprename to src/core/hle/service/am/am_net.cppindex ba2a499f1a..b1af0e9d81 100644--- a/src/core/hle/service/am_net.cpp+++ b/src/core/hle/service/am/am_net.cpp@@ -3,12 +3,11 @@// Refer to the license.txt file included.#include "core/hle/hle.h"-#include "core/hle/service/am_net.h"+#include "core/hle/service/am/am.h"+#include "core/hle/service/am/am_net.h"-////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace AM_NET--namespace AM_NET {+namespace Service {+namespace AM {const Interface::FunctionInfo FunctionTable[] = {{0x08010000, nullptr, "OpenTicket"},@@ -33,11 +32,9 @@ const Interface::FunctionInfo FunctionTable[] = {{0x081B00C2, nullptr, "InstallTitlesFinish"},};-////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {+AM_NET_Interface::AM_NET_Interface() {Register(FunctionTable);}-} // namespace+} // namespace AM+} // namespace Servicediff --git a/src/core/hle/service/am/am_net.h b/src/core/hle/service/am/am_net.hnew file mode 100644index 0000000000..25d2c3f239--- /dev/null+++ b/src/core/hle/service/am/am_net.h@@ -0,0 +1,22 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace AM {++class AM_NET_Interface : public Service::Interface {+public:+ AM_NET_Interface();++ std::string GetPortName() const override {+ return "am:net";+ }+};++} // namespace AM+} // namespace Servicediff --git a/src/core/hle/service/am/am_sys.cpp b/src/core/hle/service/am/am_sys.cppnew file mode 100644index 0000000000..864fc14dfb--- /dev/null+++ b/src/core/hle/service/am/am_sys.cpp@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/am/am.h"+#include "core/hle/service/am/am_sys.h"++namespace Service {+namespace AM {++const Interface::FunctionInfo FunctionTable[] = {+ {0x00010040, TitleIDListGetTotal, "TitleIDListGetTotal"},+ {0x00020082, GetTitleIDList, "GetTitleIDList"},+};++AM_SYS_Interface::AM_SYS_Interface() {+ Register(FunctionTable);+}++} // namespace AM+} // namespace Servicediff --git a/src/core/hle/service/am/am_sys.h b/src/core/hle/service/am/am_sys.hnew file mode 100644index 0000000000..b114f1d351--- /dev/null+++ b/src/core/hle/service/am/am_sys.h@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace AM {++class AM_SYS_Interface : public Service::Interface {+public:+ AM_SYS_Interface();++ std::string GetPortName() const override {+ return "am:sys";+ }+};++} // namespace AM+} // namespace Servicediff --git a/src/core/hle/service/am/am_u.cpp b/src/core/hle/service/am/am_u.cppnew file mode 100644index 0000000000..6bf84b36b2--- /dev/null+++ b/src/core/hle/service/am/am_u.cpp@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/am/am.h"+#include "core/hle/service/am/am_u.h"++namespace Service {+namespace AM {++const Interface::FunctionInfo FunctionTable[] = {+ {0x00010040, TitleIDListGetTotal, "TitleIDListGetTotal"},+ {0x00020082, GetTitleIDList, "GetTitleIDList"},+};++AM_U_Interface::AM_U_Interface() {+ Register(FunctionTable);+}++} // namespace AM+} // namespace Servicediff --git a/src/core/hle/service/am/am_u.h b/src/core/hle/service/am/am_u.hnew file mode 100644index 0000000000..3b2454b6c7--- /dev/null+++ b/src/core/hle/service/am/am_u.h@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace AM {++class AM_U_Interface : public Service::Interface {+public:+ AM_U_Interface();++ std::string GetPortName() const override {+ return "am:u";+ }+};++} // namespace AM+} // namespace Servicediff --git a/src/core/hle/service/am_app.cpp b/src/core/hle/service/am_app.cppdeleted file mode 100644index 684b753f06..0000000000--- a/src/core/hle/service/am_app.cpp+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2014 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "core/hle/hle.h"-#include "core/hle/service/am_app.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace AM_APP--namespace AM_APP {--// Empty arrays are illegal -- commented out until an entry is added.-//const Interface::FunctionInfo FunctionTable[] = { };--////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {- //Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/am_app.h b/src/core/hle/service/am_app.hdeleted file mode 100644index 50dc2f5a2c..0000000000--- a/src/core/hle/service/am_app.h+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2014 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#pragma once--#include "core/hle/service/service.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace AM_APP--namespace AM_APP {--class Interface : public Service::Interface {-public:- Interface();-- std::string GetPortName() const override {- return "am:app";- }-};--} // namespacediff --git a/src/core/hle/service/am_net.h b/src/core/hle/service/am_net.hdeleted file mode 100644index 616c33ee8f..0000000000--- a/src/core/hle/service/am_net.h+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2014 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#pragma once--#include "core/hle/service/service.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace AM_NET--namespace AM_NET {--class Interface : public Service::Interface {-public:- Interface();-- std::string GetPortName() const override {- return "am:net";- }-};--} // namespacediff --git a/src/core/hle/service/am_sys.cpp b/src/core/hle/service/am_sys.cppdeleted file mode 100644index f9e3fe4b77..0000000000--- a/src/core/hle/service/am_sys.cpp+++ /dev/null@@ -1,62 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "common/logging/log.h"--#include "core/hle/hle.h"-#include "core/hle/service/am_sys.h"--namespace AM_SYS {--/**- * Gets the number of installed titles in the requested media type- * Inputs:- * 0: Command header (0x00010040)- * 1: Media type to load the titles from- * Outputs:- * 1: Result, 0 on success, otherwise error code- * 2: The number of titles in the requested media type- */-static void TitleIDListGetTotal(Service::Interface* self) {- u32* cmd_buff = Kernel::GetCommandBuffer();- u32 media_type = cmd_buff[1] & 0xFF;-- cmd_buff[1] = RESULT_SUCCESS.raw;- cmd_buff[2] = 0;- LOG_WARNING(Service_CFG, "(STUBBED) media_type %u", media_type);-}--/**- * Loads information about the desired number of titles from the desired media type into an array- * Inputs:- * 0: Command header (0x00020082)- * 1: The maximum number of titles to load- * 2: Media type to load the titles from- * 3: Descriptor of the output buffer pointer- * 4: Address of the output buffer- * Outputs:- * 1: Result, 0 on success, otherwise error code- * 2: The number of titles loaded from the requested media type- */-static void GetTitleIDList(Service::Interface* self) {- u32* cmd_buff = Kernel::GetCommandBuffer();- u32 num_titles = cmd_buff[1];- u32 media_type = cmd_buff[2] & 0xFF;- u32 addr = cmd_buff[4];-- cmd_buff[1] = RESULT_SUCCESS.raw;- cmd_buff[2] = 0;- LOG_WARNING(Service_CFG, "(STUBBED) Requested %u titles from media type %u", num_titles, media_type);-}--const Interface::FunctionInfo FunctionTable[] = {- {0x00010040, TitleIDListGetTotal, "TitleIDListGetTotal"},- {0x00020082, GetTitleIDList, "GetTitleIDList"},-};--Interface::Interface() {- Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/am_sys.h b/src/core/hle/service/am_sys.hdeleted file mode 100644index bb6178a43b..0000000000--- a/src/core/hle/service/am_sys.h+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#pragma once--#include "core/hle/service/service.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace AM_SYS--namespace AM_SYS {--class Interface : public Service::Interface {-public:- Interface();-- std::string GetPortName() const override {- return "am:sys";- }-};--} // namespacediff --git a/src/core/hle/service/boss/boss.cpp b/src/core/hle/service/boss/boss.cppnew file mode 100644index 0000000000..d38140f192--- /dev/null+++ b/src/core/hle/service/boss/boss.cpp@@ -0,0 +1,29 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/service/service.h"+#include "core/hle/service/boss/boss.h"+#include "core/hle/service/boss/boss_p.h"+#include "core/hle/service/boss/boss_u.h"++#include "core/hle/kernel/event.h"+#include "core/hle/kernel/shared_memory.h"+#include "core/hle/hle.h"++namespace Service {+namespace BOSS {++void Init() {+ using namespace Kernel;++ AddService(new BOSS_P_Interface);+ AddService(new BOSS_U_Interface);+}++void Shutdown() {+}++} // namespace BOSS++} // namespace Servicediff --git a/src/core/hle/service/boss/boss.h b/src/core/hle/service/boss/boss.hnew file mode 100644index 0000000000..a6942ada6b--- /dev/null+++ b/src/core/hle/service/boss/boss.h@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/kernel/kernel.h"+#include "core/hle/service/service.h"++namespace Service {+namespace BOSS {++/// Initialize BOSS service(s)+void Init();++/// Shutdown BOSS service(s)+void Shutdown();++} // namespace BOSS+} // namespace Servicediff --git a/src/core/hle/service/boss/boss_p.cpp b/src/core/hle/service/boss/boss_p.cppnew file mode 100644index 0000000000..089f5f186c--- /dev/null+++ b/src/core/hle/service/boss/boss_p.cpp@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/boss/boss.h"+#include "core/hle/service/boss/boss_p.h"++namespace Service {+namespace BOSS {++// Empty arrays are illegal -- commented out until an entry is added.+// const Interface::FunctionInfo FunctionTable[] = { };++BOSS_P_Interface::BOSS_P_Interface() {+ //Register(FunctionTable);+}++} // namespace BOSS+} // namespace Servicediff --git a/src/core/hle/service/boss/boss_p.h b/src/core/hle/service/boss/boss_p.hnew file mode 100644index 0000000000..32112c251f--- /dev/null+++ b/src/core/hle/service/boss/boss_p.h@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace BOSS {++class BOSS_P_Interface : public Service::Interface {+public:+ BOSS_P_Interface();++ std::string GetPortName() const override {+ return "boss:P";+ }+};++} // namespace BOSS+} // namespace Servicediff --git a/src/core/hle/service/boss/boss_u.cpp b/src/core/hle/service/boss/boss_u.cppnew file mode 100644index 0000000000..ed978b963f--- /dev/null+++ b/src/core/hle/service/boss/boss_u.cpp@@ -0,0 +1,21 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/boss/boss.h"+#include "core/hle/service/boss/boss_u.h"++namespace Service {+namespace BOSS {++const Interface::FunctionInfo FunctionTable[] = {+ {0x00020100, nullptr, "GetStorageInfo"},+};++BOSS_U_Interface::BOSS_U_Interface() {+ Register(FunctionTable);+}++} // namespace BOSS+} // namespace Servicediff --git a/src/core/hle/service/boss/boss_u.h b/src/core/hle/service/boss/boss_u.hnew file mode 100644index 0000000000..d047d8cf22--- /dev/null+++ b/src/core/hle/service/boss/boss_u.h@@ -0,0 +1,22 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace BOSS {++class BOSS_U_Interface : public Service::Interface {+public:+ BOSS_U_Interface();++ std::string GetPortName() const override {+ return "boss:U";+ }+};++} // namespace BOSS+} // namespace Servicediff --git a/src/core/hle/service/boss_p.cpp b/src/core/hle/service/boss_p.cppdeleted file mode 100644index 8280830e5d..0000000000--- a/src/core/hle/service/boss_p.cpp+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "core/hle/hle.h"-#include "core/hle/service/boss_p.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace BOSS_P--namespace BOSS_P {--// Empty arrays are illegal -- commented out until an entry is added.-// const Interface::FunctionInfo FunctionTable[] = { };--////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {- //Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/boss_p.h b/src/core/hle/service/boss_p.hdeleted file mode 100644index 6fb51d57d2..0000000000--- a/src/core/hle/service/boss_p.h+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#pragma once--#include "core/hle/service/service.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace BOSS_P--namespace BOSS_P {--class Interface : public Service::Interface {-public:- Interface();-- std::string GetPortName() const override {- return "boss:P";- }-};--} // namespacediff --git a/src/core/hle/service/boss_u.cpp b/src/core/hle/service/boss_u.cppdeleted file mode 100644index 2c322bdfd3..0000000000--- a/src/core/hle/service/boss_u.cpp+++ /dev/null@@ -1,24 +0,0 @@-// Copyright 2014 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "core/hle/hle.h"-#include "core/hle/service/boss_u.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace BOSS_U--namespace BOSS_U {--const Interface::FunctionInfo FunctionTable[] = {- {0x00020100, nullptr, "GetStorageInfo"},-};--////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {- Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/boss_u.h b/src/core/hle/service/boss_u.hdeleted file mode 100644index 89e77fe47c..0000000000--- a/src/core/hle/service/boss_u.h+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2014 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#pragma once--#include "core/hle/service/service.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace BOSS_U--namespace BOSS_U {--class Interface : public Service::Interface {-public:- Interface();-- std::string GetPortName() const override {- return "boss:U";- }-};--} // namespacediff --git a/src/core/hle/service/cam/cam.cpp b/src/core/hle/service/cam/cam.cppnew file mode 100644index 0000000000..4f34b699b0--- /dev/null+++ b/src/core/hle/service/cam/cam.cpp@@ -0,0 +1,35 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "common/logging/log.h"++#include "core/hle/service/service.h"+#include "core/hle/service/cam/cam.h"+#include "core/hle/service/cam/cam_c.h"+#include "core/hle/service/cam/cam_q.h"+#include "core/hle/service/cam/cam_s.h"+#include "core/hle/service/cam/cam_u.h"++#include "core/hle/kernel/event.h"+#include "core/hle/kernel/shared_memory.h"+#include "core/hle/hle.h"++namespace Service {+namespace CAM {++void Init() {+ using namespace Kernel;++ AddService(new CAM_C_Interface);+ AddService(new CAM_Q_Interface);+ AddService(new CAM_S_Interface);+ AddService(new CAM_U_Interface);+}++void Shutdown() {+}++} // namespace CAM++} // namespace Servicediff --git a/src/core/hle/service/cam/cam.h b/src/core/hle/service/cam/cam.hnew file mode 100644index 0000000000..edd524841e--- /dev/null+++ b/src/core/hle/service/cam/cam.h@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/kernel/kernel.h"+#include "core/hle/service/service.h"++namespace Service {+namespace CAM {++/// Initialize CAM service(s)+void Init();++/// Shutdown CAM service(s)+void Shutdown();++} // namespace CAM+} // namespace Servicediff --git a/src/core/hle/service/cam/cam_c.cpp b/src/core/hle/service/cam/cam_c.cppnew file mode 100644index 0000000000..d35adcb9f4--- /dev/null+++ b/src/core/hle/service/cam/cam_c.cpp@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/cam/cam.h"+#include "core/hle/service/cam/cam_c.h"++namespace Service {+namespace CAM {++// Empty arrays are illegal -- commented out until an entry is added.+//const Interface::FunctionInfo FunctionTable[] = { };++CAM_C_Interface::CAM_C_Interface() {+ //Register(FunctionTable);+}++} // namespace CAM+} // namespace Servicediff --git a/src/core/hle/service/cam/cam_c.h b/src/core/hle/service/cam/cam_c.hnew file mode 100644index 0000000000..6b296c00d0--- /dev/null+++ b/src/core/hle/service/cam/cam_c.h@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace CAM {++class CAM_C_Interface : public Service::Interface {+public:+ CAM_C_Interface();++ std::string GetPortName() const override {+ return "cam:c";+ }+};++} // namespace CAM+} // namespace Servicediff --git a/src/core/hle/service/cam/cam_q.cpp b/src/core/hle/service/cam/cam_q.cppnew file mode 100644index 0000000000..c2760a1029--- /dev/null+++ b/src/core/hle/service/cam/cam_q.cpp@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/cam/cam.h"+#include "core/hle/service/cam/cam_q.h"++namespace Service {+namespace CAM {++// Empty arrays are illegal -- commented out until an entry is added.+//const Interface::FunctionInfo FunctionTable[] = { };++CAM_Q_Interface::CAM_Q_Interface() {+ //Register(FunctionTable);+}++} // namespace CAM+} // namespace Servicediff --git a/src/core/hle/service/cam/cam_q.h b/src/core/hle/service/cam/cam_q.hnew file mode 100644index 0000000000..07cc125347--- /dev/null+++ b/src/core/hle/service/cam/cam_q.h@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace CAM {++class CAM_Q_Interface : public Service::Interface {+public:+ CAM_Q_Interface();++ std::string GetPortName() const override {+ return "cam:q";+ }+};++} // namespace CAM+} // namespace Servicediff --git a/src/core/hle/service/cam/cam_s.cpp b/src/core/hle/service/cam/cam_s.cppnew file mode 100644index 0000000000..aefbf7df46--- /dev/null+++ b/src/core/hle/service/cam/cam_s.cpp@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/cam/cam.h"+#include "core/hle/service/cam/cam_s.h"++namespace Service {+namespace CAM {++// Empty arrays are illegal -- commented out until an entry is added.+//const Interface::FunctionInfo FunctionTable[] = { };++CAM_S_Interface::CAM_S_Interface() {+ //Register(FunctionTable);+}++} // namespace CAM+} // namespace Servicediff --git a/src/core/hle/service/cam/cam_s.h b/src/core/hle/service/cam/cam_s.hnew file mode 100644index 0000000000..0a5d6fca27--- /dev/null+++ b/src/core/hle/service/cam/cam_s.h@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace CAM {++class CAM_S_Interface : public Service::Interface {+public:+ CAM_S_Interface();++ std::string GetPortName() const override {+ return "cam:s";+ }+};++} // namespace CAM+} // namespace Servicediff --git a/src/core/hle/service/cam/cam_u.cpp b/src/core/hle/service/cam/cam_u.cppnew file mode 100644index 0000000000..1c6aca955b--- /dev/null+++ b/src/core/hle/service/cam/cam_u.cpp@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/cam/cam.h"+#include "core/hle/service/cam/cam_u.h"++namespace Service {+namespace CAM {++// Empty arrays are illegal -- commented out until an entry is added.+//const Interface::FunctionInfo FunctionTable[] = { };++CAM_U_Interface::CAM_U_Interface() {+ //Register(FunctionTable);+}++} // namespace CAM+} // namespace Servicediff --git a/src/core/hle/service/cam/cam_u.h b/src/core/hle/service/cam/cam_u.hnew file mode 100644index 0000000000..3692640376--- /dev/null+++ b/src/core/hle/service/cam/cam_u.h@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace CAM {++class CAM_U_Interface : public Service::Interface {+public:+ CAM_U_Interface();++ std::string GetPortName() const override {+ return "cam:u";+ }+};++} // namespace CAM+} // namespace Servicediff --git a/src/core/hle/service/cam_u.cpp b/src/core/hle/service/cam_u.cppdeleted file mode 100644index ecda0dbdf9..0000000000--- a/src/core/hle/service/cam_u.cpp+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "core/hle/hle.h"-#include "core/hle/service/cam_u.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace CAM_U--namespace CAM_U {--// Empty arrays are illegal -- commented out until an entry is added.-//const Interface::FunctionInfo FunctionTable[] = { };--////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {- //Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/cam_u.h b/src/core/hle/service/cam_u.hdeleted file mode 100644index 878c20a845..0000000000--- a/src/core/hle/service/cam_u.h+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#pragma once--#include "core/hle/service/service.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace CAM_U--namespace CAM_U {--class Interface : public Service::Interface {-public:- Interface();-- std::string GetPortName() const override {- return "cam:u";- }-};--} // namespacediff --git a/src/core/hle/service/cecd/cecd.cpp b/src/core/hle/service/cecd/cecd.cppnew file mode 100644index 0000000000..db0e52b798--- /dev/null+++ b/src/core/hle/service/cecd/cecd.cpp@@ -0,0 +1,31 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "common/logging/log.h"++#include "core/hle/service/service.h"+#include "core/hle/service/cecd/cecd.h"+#include "core/hle/service/cecd/cecd_s.h"+#include "core/hle/service/cecd/cecd_u.h"++#include "core/hle/kernel/event.h"+#include "core/hle/kernel/shared_memory.h"+#include "core/hle/hle.h"++namespace Service {+namespace CECD {++void Init() {+ using namespace Kernel;++ AddService(new CECD_S_Interface);+ AddService(new CECD_U_Interface);+}++void Shutdown() {+}++} // namespace CECD++} // namespace Servicediff --git a/src/core/hle/service/cecd/cecd.h b/src/core/hle/service/cecd/cecd.hnew file mode 100644index 0000000000..32fd2045dc--- /dev/null+++ b/src/core/hle/service/cecd/cecd.h@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/kernel/kernel.h"+#include "core/hle/service/service.h"++namespace Service {+namespace CECD {++/// Initialize CECD service(s)+void Init();++/// Shutdown CECD service(s)+void Shutdown();++} // namespace CECD+} // namespace Servicediff --git a/src/core/hle/service/cecd/cecd_s.cpp b/src/core/hle/service/cecd/cecd_s.cppnew file mode 100644index 0000000000..72d7e8d441--- /dev/null+++ b/src/core/hle/service/cecd/cecd_s.cpp@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/cecd/cecd.h"+#include "core/hle/service/cecd/cecd_s.h"++namespace Service {+namespace CECD {++// Empty arrays are illegal -- commented out until an entry is added.+//const Interface::FunctionInfo FunctionTable[] = { };++CECD_S_Interface::CECD_S_Interface() {+ //Register(FunctionTable);+}++} // namespace CECD+} // namespace Servicediff --git a/src/core/hle/service/cecd_s.h b/src/core/hle/service/cecd/cecd_s.hsimilarity index 55%rename from src/core/hle/service/cecd_s.hrename to src/core/hle/service/cecd/cecd_s.hindex d880d03910..df5c018497 100644--- a/src/core/hle/service/cecd_s.h+++ b/src/core/hle/service/cecd/cecd_s.h@@ -6,18 +6,17 @@#include "core/hle/service/service.h"-////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace CECD_S+namespace Service {+namespace CECD {-namespace CECD_S {--class Interface : public Service::Interface {+class CECD_S_Interface : public Interface {public:- Interface();+ CECD_S_Interface();std::string GetPortName() const override {return "cecd:s";}};-} // namespace+} // namespace CECD+} // namespace Servicediff --git a/src/core/hle/service/cecd/cecd_u.cpp b/src/core/hle/service/cecd/cecd_u.cppnew file mode 100644index 0000000000..0a23bafbc4--- /dev/null+++ b/src/core/hle/service/cecd/cecd_u.cpp@@ -0,0 +1,20 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/cecd/cecd.h"+#include "core/hle/service/cecd/cecd_u.h"++namespace Service {+namespace CECD {++// Empty arrays are illegal -- commented out until an entry is added.+//const Interface::FunctionInfo FunctionTable[] = { };++CECD_U_Interface::CECD_U_Interface() {+ //Register(FunctionTable);+}++} // namespace CECD+} // namespace Servicediff --git a/src/core/hle/service/cecd_u.h b/src/core/hle/service/cecd/cecd_u.hsimilarity index 55%rename from src/core/hle/service/cecd_u.hrename to src/core/hle/service/cecd/cecd_u.hindex e67564135d..394030ffc6 100644--- a/src/core/hle/service/cecd_u.h+++ b/src/core/hle/service/cecd/cecd_u.h@@ -6,18 +6,17 @@#include "core/hle/service/service.h"-////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace CECD_U+namespace Service {+namespace CECD {-namespace CECD_U {--class Interface : public Service::Interface {+class CECD_U_Interface : public Interface {public:- Interface();+ CECD_U_Interface();std::string GetPortName() const override {return "cecd:u";}};-} // namespace+} // namespace CECD+} // namespace Servicediff --git a/src/core/hle/service/cecd_s.cpp b/src/core/hle/service/cecd_s.cppdeleted file mode 100644index b298f151d2..0000000000--- a/src/core/hle/service/cecd_s.cpp+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "core/hle/hle.h"-#include "core/hle/service/cecd_s.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace CECD_S--namespace CECD_S {--// Empty arrays are illegal -- commented out until an entry is added.-//const Interface::FunctionInfo FunctionTable[] = { };--////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {- //Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/cecd_u.cpp b/src/core/hle/service/cecd_u.cppdeleted file mode 100644index 9125364bc8..0000000000--- a/src/core/hle/service/cecd_u.cpp+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2014 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "core/hle/hle.h"-#include "core/hle/service/cecd_u.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace CECD_U--namespace CECD_U {--// Empty arrays are illegal -- commented out until an entry is added.-//const Interface::FunctionInfo FunctionTable[] = { };--////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {- //Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/frd/frd.cpp b/src/core/hle/service/frd/frd.cppnew file mode 100644index 0000000000..2911ab402d--- /dev/null+++ b/src/core/hle/service/frd/frd.cpp@@ -0,0 +1,29 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/service/service.h"+#include "core/hle/service/frd/frd.h"+#include "core/hle/service/frd/frd_a.h"+#include "core/hle/service/frd/frd_u.h"++#include "core/hle/kernel/event.h"+#include "core/hle/kernel/shared_memory.h"+#include "core/hle/hle.h"++namespace Service {+namespace FRD {++void Init() {+ using namespace Kernel;++ AddService(new FRD_A_Interface);+ AddService(new FRD_U_Interface);+}++void Shutdown() {+}++} // namespace FRD++} // namespace Servicediff --git a/src/core/hle/service/frd/frd.h b/src/core/hle/service/frd/frd.hnew file mode 100644index 0000000000..41f7a2f6bf--- /dev/null+++ b/src/core/hle/service/frd/frd.h@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/kernel/kernel.h"+#include "core/hle/service/service.h"++namespace Service {+namespace FRD {++/// Initialize FRD service(s)+void Init();++/// Shutdown FRD service(s)+void Shutdown();++} // namespace FRD+} // namespace Servicediff --git a/src/core/hle/service/frd/frd_a.cpp b/src/core/hle/service/frd/frd_a.cppnew file mode 100644index 0000000000..1c438a3376--- /dev/null+++ b/src/core/hle/service/frd/frd_a.cpp@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/frd/frd.h"+#include "core/hle/service/frd/frd_a.h"++namespace Service {+namespace FRD {++// Empty arrays are illegal -- commented out until an entry is added.+// const Interface::FunctionInfo FunctionTable[] = { };++FRD_A_Interface::FRD_A_Interface() {+ //Register(FunctionTable);+}++} // namespace FRD+} // namespace Servicediff --git a/src/core/hle/service/frd_a.h b/src/core/hle/service/frd/frd_a.hsimilarity index 55%rename from src/core/hle/service/frd_a.hrename to src/core/hle/service/frd/frd_a.hindex f068c6108e..006d1caddd 100644--- a/src/core/hle/service/frd_a.h+++ b/src/core/hle/service/frd/frd_a.h@@ -6,18 +6,17 @@#include "core/hle/service/service.h"-////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace FRD_A+namespace Service {+namespace FRD {-namespace FRD_A {--class Interface : public Service::Interface {+class FRD_A_Interface : public Service::Interface {public:- Interface();+ FRD_A_Interface();std::string GetPortName() const override {return "frd:a";}};-} // namespace+} // namespace FRD+} // namespace Servicediff --git a/src/core/hle/service/frd_u.cpp b/src/core/hle/service/frd/frd_u.cppsimilarity index 70%rename from src/core/hle/service/frd_u.cpprename to src/core/hle/service/frd/frd_u.cppindex 6d2ff1e219..439c7282eb 100644--- a/src/core/hle/service/frd_u.cpp+++ b/src/core/hle/service/frd/frd_u.cpp@@ -3,12 +3,11 @@// Refer to the license.txt file included.#include "core/hle/hle.h"-#include "core/hle/service/frd_u.h"+#include "core/hle/service/frd/frd.h"+#include "core/hle/service/frd/frd_u.h"-////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace FRD_U--namespace FRD_U {+namespace Service {+namespace FRD {const Interface::FunctionInfo FunctionTable[] = {{0x00050000, nullptr, "GetFriendKey"},@@ -22,11 +21,9 @@ const Interface::FunctionInfo FunctionTable[] = {{0x00320042, nullptr, "SetClientSdkVersion"}};-////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {+FRD_U_Interface::FRD_U_Interface() {Register(FunctionTable);}-} // namespace+} // namespace FRD+} // namespace Servicediff --git a/src/core/hle/service/frd_u.h b/src/core/hle/service/frd/frd_u.hsimilarity index 55%rename from src/core/hle/service/frd_u.hrename to src/core/hle/service/frd/frd_u.hindex ab8897d5bd..07e43f155d 100644--- a/src/core/hle/service/frd_u.h+++ b/src/core/hle/service/frd/frd_u.h@@ -6,18 +6,17 @@#include "core/hle/service/service.h"-////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace FRD_U+namespace Service {+namespace FRD {-namespace FRD_U {--class Interface : public Service::Interface {+class FRD_U_Interface : public Service::Interface {public:- Interface();+ FRD_U_Interface();std::string GetPortName() const override {return "frd:u";}};-} // namespace+} // namespace FRD+} // namespace Servicediff --git a/src/core/hle/service/frd_a.cpp b/src/core/hle/service/frd_a.cppdeleted file mode 100644index 569979319c..0000000000--- a/src/core/hle/service/frd_a.cpp+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "core/hle/hle.h"-#include "core/hle/service/frd_a.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace FRD_A--namespace FRD_A {--// Empty arrays are illegal -- commented out until an entry is added.-// const Interface::FunctionInfo FunctionTable[] = { };--////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {- //Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/news/news.cpp b/src/core/hle/service/news/news.cppnew file mode 100644index 0000000000..63cbd38506--- /dev/null+++ b/src/core/hle/service/news/news.cpp@@ -0,0 +1,31 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "common/logging/log.h"++#include "core/hle/service/service.h"+#include "core/hle/service/news/news.h"+#include "core/hle/service/news/news_s.h"+#include "core/hle/service/news/news_u.h"++#include "core/hle/hle.h"+#include "core/hle/kernel/event.h"+#include "core/hle/kernel/shared_memory.h"++namespace Service {+namespace NEWS {++void Init() {+ using namespace Kernel;++ AddService(new NEWS_S_Interface);+ AddService(new NEWS_U_Interface);+}++void Shutdown() {+}++} // namespace NEWS++} // namespace Servicediff --git a/src/core/hle/service/news/news.h b/src/core/hle/service/news/news.hnew file mode 100644index 0000000000..b31ade255f--- /dev/null+++ b/src/core/hle/service/news/news.h@@ -0,0 +1,20 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/kernel/kernel.h"+#include "core/hle/service/service.h"++namespace Service {+namespace NEWS {++/// Initialize NEWS service(s)+void Init();++/// Shutdown NEWS service(s)+void Shutdown();++} // namespace NEWS+} // namespace Servicediff --git a/src/core/hle/service/news/news_s.cpp b/src/core/hle/service/news/news_s.cppnew file mode 100644index 0000000000..2f8c37d9e3--- /dev/null+++ b/src/core/hle/service/news/news_s.cpp@@ -0,0 +1,21 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/news/news.h"+#include "core/hle/service/news/news_s.h"++namespace Service {+namespace NEWS {++const Interface::FunctionInfo FunctionTable[] = {+ {0x000100C6, nullptr, "AddNotification"},+};++NEWS_S_Interface::NEWS_S_Interface() {+ Register(FunctionTable);+}++} // namespace NEWS+} // namespace Servicediff --git a/src/core/hle/service/news_s.h b/src/core/hle/service/news/news_s.hsimilarity index 55%rename from src/core/hle/service/news_s.hrename to src/core/hle/service/news/news_s.hindex f8b4636d54..f58b969a84 100644--- a/src/core/hle/service/news_s.h+++ b/src/core/hle/service/news/news_s.h@@ -6,18 +6,17 @@#include "core/hle/service/service.h"-////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace NEWS_S+namespace Service {+namespace NEWS {-namespace NEWS_S {--class Interface : public Service::Interface {+class NEWS_S_Interface : public Service::Interface {public:- Interface();+ NEWS_S_Interface();std::string GetPortName() const override {return "news:s";}};-} // namespace+} // namespace NEWS+} // namespace Servicediff --git a/src/core/hle/service/news/news_u.cpp b/src/core/hle/service/news/news_u.cppnew file mode 100644index 0000000000..81f45a2445--- /dev/null+++ b/src/core/hle/service/news/news_u.cpp@@ -0,0 +1,21 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/news/news.h"+#include "core/hle/service/news/news_u.h"++namespace Service {+namespace NEWS {++const Interface::FunctionInfo FunctionTable[] = {+ {0x000100C6, nullptr, "AddNotification"},+};++NEWS_U_Interface::NEWS_U_Interface() {+ Register(FunctionTable);+}++} // namespace NEWS+} // namespace Servicediff --git a/src/core/hle/service/news_u.h b/src/core/hle/service/news/news_u.hsimilarity index 55%rename from src/core/hle/service/news_u.hrename to src/core/hle/service/news/news_u.hindex 0473cd19cb..2720053d00 100644--- a/src/core/hle/service/news_u.h+++ b/src/core/hle/service/news/news_u.h@@ -6,18 +6,17 @@#include "core/hle/service/service.h"-////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace NEWS_U+namespace Service {+namespace NEWS {-namespace NEWS_U {--class Interface : public Service::Interface {+class NEWS_U_Interface : public Service::Interface {public:- Interface();+ NEWS_U_Interface();std::string GetPortName() const override {return "news:u";}};-} // namespace+} // namespace NEWS+} // namespace Servicediff --git a/src/core/hle/service/news_s.cpp b/src/core/hle/service/news_s.cppdeleted file mode 100644index 302d588c7c..0000000000--- a/src/core/hle/service/news_s.cpp+++ /dev/null@@ -1,24 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "core/hle/hle.h"-#include "core/hle/service/news_s.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace NEWS_S--namespace NEWS_S {--const Interface::FunctionInfo FunctionTable[] = {- {0x000100C6, nullptr, "AddNotification"},-};--////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {- Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/news_u.cpp b/src/core/hle/service/news_u.cppdeleted file mode 100644index 7d835aa302..0000000000--- a/src/core/hle/service/news_u.cpp+++ /dev/null@@ -1,24 +0,0 @@-// Copyright 2014 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "core/hle/hle.h"-#include "core/hle/service/news_u.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace NEWS_U--namespace NEWS_U {--const Interface::FunctionInfo FunctionTable[] = {- {0x000100C8, nullptr, "AddNotification"},-};--////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {- Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cppnew file mode 100644index 0000000000..73b0ee52a2--- /dev/null+++ b/src/core/hle/service/nim/nim.cpp@@ -0,0 +1,42 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "common/logging/log.h"++#include "core/hle/service/service.h"+#include "core/hle/service/nim/nim.h"+#include "core/hle/service/nim/nim_aoc.h"+#include "core/hle/service/nim/nim_s.h"+#include "core/hle/service/nim/nim_u.h"++#include "core/hle/kernel/event.h"+#include "core/hle/kernel/shared_memory.h"+#include "core/hle/hle.h"++namespace Service {+namespace NIM {++void CheckSysUpdateAvailable(Service::Interface* self) {+ u32* cmd_buff = Kernel::GetCommandBuffer();++ cmd_buff[1] = RESULT_SUCCESS.raw;+ cmd_buff[2] = 0; // No update available++ LOG_WARNING(Service_NWM, "(STUBBED) called");+}++void Init() {+ using namespace Kernel;++ AddService(new NIM_AOC_Interface);+ AddService(new NIM_S_Interface);+ AddService(new NIM_U_Interface);+}++void Shutdown() {+}++} // namespace NIM++} // namespace Servicediff --git a/src/core/hle/service/nim/nim.h b/src/core/hle/service/nim/nim.hnew file mode 100644index 0000000000..f7635c7475--- /dev/null+++ b/src/core/hle/service/nim/nim.h@@ -0,0 +1,30 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/kernel/kernel.h"+#include "core/hle/service/service.h"++namespace Service {+namespace NIM {++/**+ * NIM::CheckSysUpdateAvailable service function+ * Inputs:+ * 1 : None+ * Outputs:+ * 1 : Result of function, 0 on success, otherwise error code+ * 2 : flag, 0 = no system update available, 1 = system update available.+ */+void CheckSysUpdateAvailable(Service::Interface* self);++/// Initialize NIM service(s)+void Init();++/// Shutdown NIM service(s)+void Shutdown();++} // namespace NIM+} // namespace Servicediff --git a/src/core/hle/service/nim_aoc.cpp b/src/core/hle/service/nim/nim_aoc.cppsimilarity index 68%rename from src/core/hle/service/nim_aoc.cpprename to src/core/hle/service/nim/nim_aoc.cppindex 7a6aea91a6..e6b1b6145a 100644--- a/src/core/hle/service/nim_aoc.cpp+++ b/src/core/hle/service/nim/nim_aoc.cpp@@ -3,12 +3,11 @@// Refer to the license.txt file included.#include "core/hle/hle.h"-#include "core/hle/service/nim_aoc.h"+#include "core/hle/service/nim/nim.h"+#include "core/hle/service/nim/nim_aoc.h"-////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace NIM_AOC--namespace NIM_AOC {+namespace Service {+namespace NIM {const Interface::FunctionInfo FunctionTable[] = {{0x00030042, nullptr, "SetApplicationId"},@@ -20,11 +19,10 @@ const Interface::FunctionInfo FunctionTable[] = {{0x00240282, nullptr, "CalculateContentsRequiredSize"},{0x00250000, nullptr, "RefreshServerTime"},};-////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class-Interface::Interface() {+NIM_AOC_Interface::NIM_AOC_Interface() {Register(FunctionTable);}-} // namespace+} // namespace NIM+} // namespace Servicediff --git a/src/core/hle/service/nim/nim_aoc.h b/src/core/hle/service/nim/nim_aoc.hnew file mode 100644index 0000000000..aace45b5aa--- /dev/null+++ b/src/core/hle/service/nim/nim_aoc.h@@ -0,0 +1,22 @@+// Copyright 2014 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace NIM {++class NIM_AOC_Interface : public Service::Interface {+public:+ NIM_AOC_Interface();++ std::string GetPortName() const override {+ return "nim:aoc";+ }+};++} // namespace NIM+} // namespace Servicediff --git a/src/core/hle/service/nim/nim_s.cpp b/src/core/hle/service/nim/nim_s.cppnew file mode 100644index 0000000000..5d8bc059f3--- /dev/null+++ b/src/core/hle/service/nim/nim_s.cpp@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/nim/nim.h"+#include "core/hle/service/nim/nim_s.h"++namespace Service {+namespace NIM {++const Interface::FunctionInfo FunctionTable[] = {+ {0x000A0000, nullptr, "CheckSysupdateAvailableSOAP"},+};++NIM_S_Interface::NIM_S_Interface() {+ Register(FunctionTable);+}++} // namespace NIM+} // namespace Service+diff --git a/src/core/hle/service/nim/nim_s.h b/src/core/hle/service/nim/nim_s.hnew file mode 100644index 0000000000..f4bf73d263--- /dev/null+++ b/src/core/hle/service/nim/nim_s.h@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace NIM {++class NIM_S_Interface : public Service::Interface {+public:+ NIM_S_Interface();++ std::string GetPortName() const override {+ return "nim:s";+ }+};++} // namespace NIM+} // namespace Servicediff --git a/src/core/hle/service/nim/nim_u.cpp b/src/core/hle/service/nim/nim_u.cppnew file mode 100644index 0000000000..066570a859--- /dev/null+++ b/src/core/hle/service/nim/nim_u.cpp@@ -0,0 +1,27 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/hle.h"+#include "core/hle/service/nim/nim.h"+#include "core/hle/service/nim/nim_u.h"++namespace Service {+namespace NIM {++const Interface::FunctionInfo FunctionTable[] = {+ {0x00010000, nullptr, "StartSysUpdate"},+ {0x00020000, nullptr, "GetUpdateDownloadProgress"},+ {0x00040000, nullptr, "FinishTitlesInstall"},+ {0x00050000, nullptr, "CheckForSysUpdateEvent"},+ {0x00090000, CheckSysUpdateAvailable, "CheckSysUpdateAvailable"},+ {0x000A0000, nullptr, "GetState"},+};++NIM_U_Interface::NIM_U_Interface() {+ Register(FunctionTable);+}++} // namespace NIM+} // namespace Service+diff --git a/src/core/hle/service/nim/nim_u.h b/src/core/hle/service/nim/nim_u.hnew file mode 100644index 0000000000..bc89dc0f38--- /dev/null+++ b/src/core/hle/service/nim/nim_u.h@@ -0,0 +1,22 @@+// Copyright 2015 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included..++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace NIM {++class NIM_U_Interface : public Service::Interface {+public:+ NIM_U_Interface();++ std::string GetPortName() const override {+ return "nim:u";+ }+};++} // namespace NIM+} // namespace Servicediff --git a/src/core/hle/service/nim_aoc.h b/src/core/hle/service/nim_aoc.hdeleted file mode 100644index aeb71eed2a..0000000000--- a/src/core/hle/service/nim_aoc.h+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2014 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#pragma once--#include "core/hle/service/service.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace NIM_AOC--namespace NIM_AOC {--class Interface : public Service::Interface {-public:- Interface();-- std::string GetPortName() const override {- return "nim:aoc";- }-};--} // namespacediff --git a/src/core/hle/service/nim_u.cpp b/src/core/hle/service/nim_u.cppdeleted file mode 100644index 5f13bd98e8..0000000000--- a/src/core/hle/service/nim_u.cpp+++ /dev/null@@ -1,48 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#include "common/logging/log.h"--#include "core/hle/hle.h"-#include "core/hle/service/nim_u.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace NIM_U--namespace NIM_U {--/**- * NIM_U::CheckSysUpdateAvailable service function- * Inputs:- * 1 : None- * Outputs:- * 1 : Result of function, 0 on success, otherwise error code- * 2 : flag, 0 = no system update available, 1 = system update available.- */-static void CheckSysUpdateAvailable(Service::Interface* self) {- u32* cmd_buff = Kernel::GetCommandBuffer();-- cmd_buff[1] = RESULT_SUCCESS.raw;- cmd_buff[2] = 0; // No update available-- LOG_WARNING(Service_NWM, "(STUBBED) called");-}--const Interface::FunctionInfo FunctionTable[] = {- {0x00010000, nullptr, "StartSysUpdate"},- {0x00020000, nullptr, "GetUpdateDownloadProgress"},- {0x00040000, nullptr, "FinishTitlesInstall"},- {0x00050000, nullptr, "CheckForSysUpdateEvent"},- {0x00090000, CheckSysUpdateAvailable, "CheckSysUpdateAvailable"},- {0x000A0000, nullptr, "GetState"},-};--////////////////////////////////////////////////////////////////////////////////////////////////////-// Interface class--Interface::Interface() {- Register(FunctionTable);-}--} // namespacediff --git a/src/core/hle/service/nim_u.h b/src/core/hle/service/nim_u.hdeleted file mode 100644index 57a1f6acf1..0000000000--- a/src/core/hle/service/nim_u.h+++ /dev/null@@ -1,23 +0,0 @@-// Copyright 2015 Citra Emulator Project-// Licensed under GPLv2 or any later version-// Refer to the license.txt file included.--#pragma once--#include "core/hle/service/service.h"--////////////////////////////////////////////////////////////////////////////////////////////////////-// Namespace NIM_U--namespace NIM_U {--class Interface : public Service::Interface {-public:- Interface();-- std::string GetPortName() const override {- return "nim:u";- }-};--} // namespacediff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cppindex dc667500cd..d681cc3dc4 100644--- a/src/core/hle/service/service.cpp+++ b/src/core/hle/service/service.cpp@@ -8,29 +8,15 @@#include "core/hle/service/service.h"#include "core/hle/service/ac_u.h"#include "core/hle/service/act_u.h"-#include "core/hle/service/am_app.h"-#include "core/hle/service/am_net.h"-#include "core/hle/service/am_sys.h"-#include "core/hle/service/boss_p.h"-#include "core/hle/service/boss_u.h"-#include "core/hle/service/cam_u.h"-#include "core/hle/service/cecd_u.h"-#include "core/hle/service/cecd_s.h"#include "core/hle/service/csnd_snd.h"#include "core/hle/service/dsp_dsp.h"#include "core/hle/service/err_f.h"-#include "core/hle/service/frd_a.h"-#include "core/hle/service/frd_u.h"#include "core/hle/service/gsp_gpu.h"#include "core/hle/service/gsp_lcd.h"#include "core/hle/service/http_c.h"#include "core/hle/service/ldr_ro.h"#include "core/hle/service/mic_u.h"#include "core/hle/service/ndm_u.h"-#include "core/hle/service/news_s.h"-#include "core/hle/service/news_u.h"-#include "core/hle/service/nim_aoc.h"-#include "core/hle/service/nim_u.h"#include "core/hle/service/ns_s.h"#include "core/hle/service/nwm_uds.h"#include "core/hle/service/pm_app.h"@@ -39,11 +25,18 @@#include "core/hle/service/ssl_c.h"#include "core/hle/service/y2r_u.h"+#include "core/hle/service/am/am.h"#include "core/hle/service/apt/apt.h"+#include "core/hle/service/boss/boss.h"+#include "core/hle/service/cam/cam.h"+#include "core/hle/service/cecd/cecd.h"+#include "core/hle/service/frd/frd.h"#include "core/hle/service/fs/archive.h"#include "core/hle/service/cfg/cfg.h"#include "core/hle/service/hid/hid.h"#include "core/hle/service/ir/ir.h"+#include "core/hle/service/news/news.h"+#include "core/hle/service/nim/nim.h"#include "core/hle/service/ptm/ptm.h"namespace Service {@@ -111,36 +104,29 @@ void Init() {AddNamedPort(new ERR_F::Interface);Service::FS::ArchiveInit();- Service::CFG::Init();+ Service::AM::Init();Service::APT::Init();- Service::PTM::Init();+ Service::BOSS::Init();+ Service::CAM::Init();+ Service::CECD::Init();+ Service::CFG::Init();+ Service::FRD::Init();Service::HID::Init();Service::IR::Init();+ Service::NEWS::Init();+ Service::NIM::Init();+ Service::PTM::Init();AddService(new AC_U::Interface);AddService(new ACT_U::Interface);- AddService(new AM_APP::Interface);- AddService(new AM_NET::Interface);- AddService(new AM_SYS::Interface);- AddService(new BOSS_P::Interface);- AddService(new BOSS_U::Interface);- AddService(new CAM_U::Interface);- AddService(new CECD_S::Interface);- AddService(new CECD_U::Interface);AddService(new CSND_SND::Interface);AddService(new DSP_DSP::Interface);- AddService(new FRD_A::Interface);- AddService(new FRD_U::Interface);AddService(new GSP_GPU::Interface);AddService(new GSP_LCD::Interface);AddService(new HTTP_C::Interface);AddService(new LDR_RO::Interface);AddService(new MIC_U::Interface);AddService(new NDM_U::Interface);- AddService(new NEWS_S::Interface);- AddService(new NEWS_U::Interface);- AddService(new NIM_AOC::Interface);- AddService(new NIM_U::Interface);AddService(new NS_S::Interface);AddService(new NWM_UDS::Interface);AddService(new PM_APP::Interface);@@ -153,11 +139,19 @@ void Init() {/// Shutdown ServiceManagervoid Shutdown() {++ Service::PTM::Shutdown();+ Service::NIM::Shutdown();+ Service::NEWS::Shutdown();Service::IR::Shutdown();Service::HID::Shutdown();- Service::PTM::Shutdown();- Service::APT::Shutdown();+ Service::FRD::Shutdown();Service::CFG::Shutdown();+ Service::CECD::Shutdown();+ Service::CAM::Shutdown();+ Service::BOSS::Shutdown();+ Service::APT::Shutdown();+ Service::AM::Shutdown();Service::FS::ArchiveShutdown();g_srv_services.clear();