summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-12-15 07:49:33 +0100
committerarchshift <admin@archshift.com>2014-12-16 00:32:42 +0100
commit6117fad03604dca573b5b19ebbb571a28df89421 (patch)
tree0ad72b604d37f002feb5a10ee5aa1e58dc777b03
parentAdded am:app service stub. (diff)
downloadyuzu-6117fad03604dca573b5b19ebbb571a28df89421.tar
yuzu-6117fad03604dca573b5b19ebbb571a28df89421.tar.gz
yuzu-6117fad03604dca573b5b19ebbb571a28df89421.tar.bz2
yuzu-6117fad03604dca573b5b19ebbb571a28df89421.tar.lz
yuzu-6117fad03604dca573b5b19ebbb571a28df89421.tar.xz
yuzu-6117fad03604dca573b5b19ebbb571a28df89421.tar.zst
yuzu-6117fad03604dca573b5b19ebbb571a28df89421.zip
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/ldr_ro.cpp28
-rw-r--r--src/core/hle/service/ldr_ro.h27
-rw-r--r--src/core/hle/service/service.cpp2
4 files changed, 59 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 352bb5b2b..3cf383f32 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -47,6 +47,7 @@ set(SRCS
hle/service/hid_user.cpp
hle/service/ir_rst.cpp
hle/service/ir_u.cpp
+ hle/service/ldr_ro.cpp
hle/service/mic_u.cpp
hle/service/ndm_u.cpp
hle/service/nwm_uds.cpp
@@ -127,6 +128,7 @@ set(HEADERS
hle/service/hid_user.h
hle/service/ir_rst.h
hle/service/ir_u.h
+ hle/service/ldr_ro.h
hle/service/mic_u.h
hle/service/ndm_u.h
hle/service/nwm_uds.h
diff --git a/src/core/hle/service/ldr_ro.cpp b/src/core/hle/service/ldr_ro.cpp
new file mode 100644
index 000000000..91b1a6fc5
--- /dev/null
+++ b/src/core/hle/service/ldr_ro.cpp
@@ -0,0 +1,28 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2+
+// Refer to the license.txt file included.
+
+#include "common/log.h"
+#include "core/hle/hle.h"
+#include "core/hle/service/ldr_ro.h"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Namespace LDR_RO
+
+namespace LDR_RO {
+
+const Interface::FunctionInfo FunctionTable[] = {
+ {0x000100C2, nullptr, "Initialize"},
+ {0x00020082, nullptr, "CRR_Load"},
+ {0x00030042, nullptr, "CRR_Unload"},
+ {0x000402C2, nullptr, "CRO_LoadAndFix"},
+ {0x000500C2, nullptr, "CRO_ApplyRelocationPatchesAndLink"}
+};
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Interface class
+
+Interface::Interface() {
+ Register(FunctionTable, ARRAY_SIZE(FunctionTable));
+}
+
+} // namespace
diff --git a/src/core/hle/service/ldr_ro.h b/src/core/hle/service/ldr_ro.h
new file mode 100644
index 000000000..32d7c29cf
--- /dev/null
+++ b/src/core/hle/service/ldr_ro.h
@@ -0,0 +1,27 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2+
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "core/hle/service/service.h"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Namespace LDR_RO
+
+namespace LDR_RO {
+
+class Interface : public Service::Interface {
+public:
+ Interface();
+
+ /**
+ * Gets the string port name used by CTROS for the service
+ * @return Port name of service
+ */
+ std::string GetPortName() const override {
+ return "ldr:ro";
+ }
+};
+
+} // namespace
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 287cd48e1..b91081542 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -22,6 +22,7 @@
#include "core/hle/service/hid_user.h"
#include "core/hle/service/ir_rst.h"
#include "core/hle/service/ir_u.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/nwm_uds.h"
@@ -100,6 +101,7 @@ void Init() {
g_manager->AddService(new HID_User::Interface);
g_manager->AddService(new IR_RST::Interface);
g_manager->AddService(new IR_U::Interface);
+ g_manager->AddService(new LDR_RO::Interface);
g_manager->AddService(new MIC_U::Interface);
g_manager->AddService(new NDM_U::Interface);
g_manager->AddService(new NWM_UDS::Interface);