summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormailwl <mailwl@gmail.com>2016-03-31 11:21:02 +0200
committermailwl <mailwl@gmail.com>2016-03-31 13:59:10 +0200
commitcb8e85a37d0784689afc60fd208213a86181698a (patch)
treea74314da04fe45a76cbf9933eba0c1df0bd85a87 /src
parentMerge pull request #1572 from MerryMage/audio-filter (diff)
downloadyuzu-cb8e85a37d0784689afc60fd208213a86181698a.tar
yuzu-cb8e85a37d0784689afc60fd208213a86181698a.tar.gz
yuzu-cb8e85a37d0784689afc60fd208213a86181698a.tar.bz2
yuzu-cb8e85a37d0784689afc60fd208213a86181698a.tar.lz
yuzu-cb8e85a37d0784689afc60fd208213a86181698a.tar.xz
yuzu-cb8e85a37d0784689afc60fd208213a86181698a.tar.zst
yuzu-cb8e85a37d0784689afc60fd208213a86181698a.zip
Diffstat (limited to 'src')
-rw-r--r--src/common/logging/backend.cpp1
-rw-r--r--src/common/logging/log.h1
-rw-r--r--src/core/hle/service/cecd/cecd.cpp29
-rw-r--r--src/core/hle/service/cecd/cecd.h23
-rw-r--r--src/core/hle/service/cecd/cecd_u.cpp5
5 files changed, 56 insertions, 3 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 4c86151ab..a22b0aeb0 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -46,6 +46,7 @@ namespace Log {
SUB(Service, NIM) \
SUB(Service, NWM) \
SUB(Service, CAM) \
+ SUB(Service, CECD) \
SUB(Service, CFG) \
SUB(Service, DSP) \
SUB(Service, HID) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index e4c39c308..b1b639f15 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -61,6 +61,7 @@ enum class Class : ClassType {
Service_NIM, ///< The NIM (Network interface manager) service
Service_NWM, ///< The NWM (Network wlan manager) service
Service_CAM, ///< The CAM (Camera) service
+ Service_CECD, ///< The CECD service
Service_CFG, ///< The CFG (Configuration) service
Service_DSP, ///< The DSP (DSP control) service
Service_HID, ///< The HID (Human interface device) service
diff --git a/src/core/hle/service/cecd/cecd.cpp b/src/core/hle/service/cecd/cecd.cpp
index 6d79ce9b4..e6e36e7ec 100644
--- a/src/core/hle/service/cecd/cecd.cpp
+++ b/src/core/hle/service/cecd/cecd.cpp
@@ -4,6 +4,7 @@
#include "common/logging/log.h"
+#include "core/hle/kernel/event.h"
#include "core/hle/service/service.h"
#include "core/hle/service/cecd/cecd.h"
#include "core/hle/service/cecd/cecd_s.h"
@@ -12,14 +13,38 @@
namespace Service {
namespace CECD {
-void Init() {
- using namespace Kernel;
+static Kernel::SharedPtr<Kernel::Event> cecinfo_event;
+static Kernel::SharedPtr<Kernel::Event> change_state_event;
+
+void GetCecInfoEventHandle(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+
+ cmd_buff[1] = RESULT_SUCCESS.raw; // No error
+ cmd_buff[3] = Kernel::g_handle_table.Create(cecinfo_event).MoveFrom(); // Event handle
+
+ LOG_WARNING(Service_CECD, "(STUBBED) called");
+}
+
+void GetChangeStateEventHandle(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+ cmd_buff[1] = RESULT_SUCCESS.raw; // No error
+ cmd_buff[3] = Kernel::g_handle_table.Create(change_state_event).MoveFrom(); // Event handle
+
+ LOG_WARNING(Service_CECD, "(STUBBED) called");
+}
+
+void Init() {
AddService(new CECD_S_Interface);
AddService(new CECD_U_Interface);
+
+ cecinfo_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "CECD_U::cecinfo_event");
+ change_state_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "CECD_U::change_state_event");
}
void Shutdown() {
+ cecinfo_event = nullptr;
+ change_state_event = nullptr;
}
} // namespace CECD
diff --git a/src/core/hle/service/cecd/cecd.h b/src/core/hle/service/cecd/cecd.h
index 9e158521b..89a8d67bb 100644
--- a/src/core/hle/service/cecd/cecd.h
+++ b/src/core/hle/service/cecd/cecd.h
@@ -5,8 +5,31 @@
#pragma once
namespace Service {
+
+class Interface;
+
namespace CECD {
+/**
+ * GetCecInfoEventHandle service function
+ * Inputs:
+ * 0: 0x000F0000
+ * Outputs:
+ * 1: ResultCode
+ * 3: Event Handle
+ */
+void GetCecInfoEventHandle(Service::Interface* self);
+
+/**
+ * GetChangeStateEventHandle service function
+ * Inputs:
+ * 0: 0x00100000
+ * Outputs:
+ * 1: ResultCode
+ * 3: Event Handle
+ */
+void GetChangeStateEventHandle(Service::Interface* self);
+
/// Initialize CECD service(s)
void Init();
diff --git a/src/core/hle/service/cecd/cecd_u.cpp b/src/core/hle/service/cecd/cecd_u.cpp
index 9b720a738..ace1c73c0 100644
--- a/src/core/hle/service/cecd/cecd_u.cpp
+++ b/src/core/hle/service/cecd/cecd_u.cpp
@@ -2,13 +2,16 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include "core/hle/service/cecd/cecd.h"
#include "core/hle/service/cecd/cecd_u.h"
namespace Service {
namespace CECD {
static const Interface::FunctionInfo FunctionTable[] = {
- { 0x00120104, nullptr, "ReadSavedData" },
+ {0x000F0000, GetCecInfoEventHandle, "GetCecInfoEventHandle"},
+ {0x00100000, GetChangeStateEventHandle, "GetChangeStateEventHandle"},
+ {0x00120104, nullptr, "ReadSavedData"},
};
CECD_U_Interface::CECD_U_Interface() {