mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-23 06:15:40 +01:00
Service/CECD: Add cecd:ndm service
This commit is contained in:
parent
ec9130de8d
commit
7f27be1521
@ -74,6 +74,7 @@ set(SRCS
|
|||||||
hle/service/cam/cam_s.cpp
|
hle/service/cam/cam_s.cpp
|
||||||
hle/service/cam/cam_u.cpp
|
hle/service/cam/cam_u.cpp
|
||||||
hle/service/cecd/cecd.cpp
|
hle/service/cecd/cecd.cpp
|
||||||
|
hle/service/cecd/cecd_ndm.cpp
|
||||||
hle/service/cecd/cecd_s.cpp
|
hle/service/cecd/cecd_s.cpp
|
||||||
hle/service/cecd/cecd_u.cpp
|
hle/service/cecd/cecd_u.cpp
|
||||||
hle/service/cfg/cfg.cpp
|
hle/service/cfg/cfg.cpp
|
||||||
@ -239,6 +240,7 @@ set(HEADERS
|
|||||||
hle/service/cam/cam_s.h
|
hle/service/cam/cam_s.h
|
||||||
hle/service/cam/cam_u.h
|
hle/service/cam/cam_u.h
|
||||||
hle/service/cecd/cecd.h
|
hle/service/cecd/cecd.h
|
||||||
|
hle/service/cecd/cecd_ndm.h
|
||||||
hle/service/cecd/cecd_s.h
|
hle/service/cecd/cecd_s.h
|
||||||
hle/service/cecd/cecd_u.h
|
hle/service/cecd/cecd_u.h
|
||||||
hle/service/cfg/cfg.h
|
hle/service/cfg/cfg.h
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/kernel/event.h"
|
#include "core/hle/kernel/event.h"
|
||||||
#include "core/hle/service/cecd/cecd.h"
|
#include "core/hle/service/cecd/cecd.h"
|
||||||
|
#include "core/hle/service/cecd/cecd_ndm.h"
|
||||||
#include "core/hle/service/cecd/cecd_s.h"
|
#include "core/hle/service/cecd/cecd_s.h"
|
||||||
#include "core/hle/service/cecd/cecd_u.h"
|
#include "core/hle/service/cecd/cecd_u.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
@ -43,12 +44,13 @@ void GetChangeStateEventHandle(Service::Interface* self) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Init() {
|
void Init() {
|
||||||
AddService(new CECD_S_Interface);
|
AddService(new CECD_NDM);
|
||||||
AddService(new CECD_U_Interface);
|
AddService(new CECD_S);
|
||||||
|
AddService(new CECD_U);
|
||||||
|
|
||||||
cecinfo_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "CECD_U::cecinfo_event");
|
cecinfo_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "CECD::cecinfo_event");
|
||||||
change_state_event =
|
change_state_event =
|
||||||
Kernel::Event::Create(Kernel::ResetType::OneShot, "CECD_U::change_state_event");
|
Kernel::Event::Create(Kernel::ResetType::OneShot, "CECD::change_state_event");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shutdown() {
|
void Shutdown() {
|
||||||
|
23
src/core/hle/service/cecd/cecd_ndm.cpp
Normal file
23
src/core/hle/service/cecd/cecd_ndm.cpp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Copyright 2016 Citra Emulator Project
|
||||||
|
// 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_ndm.h"
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
namespace CECD {
|
||||||
|
|
||||||
|
static const Interface::FunctionInfo FunctionTable[] = {
|
||||||
|
{0x00010000, nullptr, "Initialize"},
|
||||||
|
{0x00020000, nullptr, "Deinitialize"},
|
||||||
|
{0x00030000, nullptr, "ResumeDaemon"},
|
||||||
|
{0x00040040, nullptr, "SuspendDaemon"},
|
||||||
|
};
|
||||||
|
|
||||||
|
CECD_NDM::CECD_NDM() {
|
||||||
|
Register(FunctionTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace CECD
|
||||||
|
} // namespace Service
|
22
src/core/hle/service/cecd/cecd_ndm.h
Normal file
22
src/core/hle/service/cecd/cecd_ndm.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Copyright 2016 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 CECD {
|
||||||
|
|
||||||
|
class CECD_NDM : public Interface {
|
||||||
|
public:
|
||||||
|
CECD_NDM();
|
||||||
|
|
||||||
|
std::string GetPortName() const override {
|
||||||
|
return "cecd:ndm";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace CECD
|
||||||
|
} // namespace Service
|
@ -2,16 +2,34 @@
|
|||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "core/hle/service/cecd/cecd.h"
|
||||||
#include "core/hle/service/cecd/cecd_s.h"
|
#include "core/hle/service/cecd/cecd_s.h"
|
||||||
|
|
||||||
namespace Service {
|
namespace Service {
|
||||||
namespace CECD {
|
namespace CECD {
|
||||||
|
|
||||||
// Empty arrays are illegal -- commented out until an entry is added.
|
static const Interface::FunctionInfo FunctionTable[] = {
|
||||||
// const Interface::FunctionInfo FunctionTable[] = { };
|
// cecd:u shared commands
|
||||||
|
{0x000100C2, nullptr, "OpenRawFile"},
|
||||||
|
{0x00020042, nullptr, "ReadRawFile"},
|
||||||
|
{0x00030104, nullptr, "ReadMessage"},
|
||||||
|
{0x00040106, nullptr, "ReadMessageWithHMAC"},
|
||||||
|
{0x00050042, nullptr, "WriteRawFile"},
|
||||||
|
{0x00060104, nullptr, "WriteMessage"},
|
||||||
|
{0x00070106, nullptr, "WriteMessageWithHMAC"},
|
||||||
|
{0x00080102, nullptr, "Delete"},
|
||||||
|
{0x000A00C4, nullptr, "GetSystemInfo"},
|
||||||
|
{0x000B0040, nullptr, "RunCommand"},
|
||||||
|
{0x000C0040, nullptr, "RunCommandAlt"},
|
||||||
|
{0x000E0000, GetCecStateAbbreviated, "GetCecStateAbbreviated"},
|
||||||
|
{0x000F0000, GetCecInfoEventHandle, "GetCecInfoEventHandle"},
|
||||||
|
{0x00100000, GetChangeStateEventHandle, "GetChangeStateEventHandle"},
|
||||||
|
{0x00110104, nullptr, "OpenAndWrite"},
|
||||||
|
{0x00120104, nullptr, "OpenAndRead"},
|
||||||
|
};
|
||||||
|
|
||||||
CECD_S_Interface::CECD_S_Interface() {
|
CECD_S::CECD_S() {
|
||||||
// Register(FunctionTable);
|
Register(FunctionTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace CECD
|
} // namespace CECD
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
namespace Service {
|
namespace Service {
|
||||||
namespace CECD {
|
namespace CECD {
|
||||||
|
|
||||||
class CECD_S_Interface : public Interface {
|
class CECD_S : public Interface {
|
||||||
public:
|
public:
|
||||||
CECD_S_Interface();
|
CECD_S();
|
||||||
|
|
||||||
std::string GetPortName() const override {
|
std::string GetPortName() const override {
|
||||||
return "cecd:s";
|
return "cecd:s";
|
||||||
|
@ -9,6 +9,7 @@ namespace Service {
|
|||||||
namespace CECD {
|
namespace CECD {
|
||||||
|
|
||||||
static const Interface::FunctionInfo FunctionTable[] = {
|
static const Interface::FunctionInfo FunctionTable[] = {
|
||||||
|
// cecd:u shared commands
|
||||||
{0x000100C2, nullptr, "OpenRawFile"},
|
{0x000100C2, nullptr, "OpenRawFile"},
|
||||||
{0x00020042, nullptr, "ReadRawFile"},
|
{0x00020042, nullptr, "ReadRawFile"},
|
||||||
{0x00030104, nullptr, "ReadMessage"},
|
{0x00030104, nullptr, "ReadMessage"},
|
||||||
@ -27,7 +28,7 @@ static const Interface::FunctionInfo FunctionTable[] = {
|
|||||||
{0x00120104, nullptr, "OpenAndRead"},
|
{0x00120104, nullptr, "OpenAndRead"},
|
||||||
};
|
};
|
||||||
|
|
||||||
CECD_U_Interface::CECD_U_Interface() {
|
CECD_U::CECD_U() {
|
||||||
Register(FunctionTable);
|
Register(FunctionTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
namespace Service {
|
namespace Service {
|
||||||
namespace CECD {
|
namespace CECD {
|
||||||
|
|
||||||
class CECD_U_Interface : public Interface {
|
class CECD_U : public Interface {
|
||||||
public:
|
public:
|
||||||
CECD_U_Interface();
|
CECD_U();
|
||||||
|
|
||||||
std::string GetPortName() const override {
|
std::string GetPortName() const override {
|
||||||
return "cecd:u";
|
return "cecd:u";
|
||||||
|
Loading…
Reference in New Issue
Block a user