1
0
Fork 0

Service/CECD: Add cecd:ndm service

This commit is contained in:
mailwl 2016-12-15 09:52:40 +03:00
parent ec9130de8d
commit 7f27be1521
8 changed files with 81 additions and 13 deletions

View File

@ -74,6 +74,7 @@ set(SRCS
hle/service/cam/cam_s.cpp
hle/service/cam/cam_u.cpp
hle/service/cecd/cecd.cpp
hle/service/cecd/cecd_ndm.cpp
hle/service/cecd/cecd_s.cpp
hle/service/cecd/cecd_u.cpp
hle/service/cfg/cfg.cpp
@ -239,6 +240,7 @@ set(HEADERS
hle/service/cam/cam_s.h
hle/service/cam/cam_u.h
hle/service/cecd/cecd.h
hle/service/cecd/cecd_ndm.h
hle/service/cecd/cecd_s.h
hle/service/cecd/cecd_u.h
hle/service/cfg/cfg.h

View File

@ -5,6 +5,7 @@
#include "common/logging/log.h"
#include "core/hle/kernel/event.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_u.h"
#include "core/hle/service/service.h"
@ -43,12 +44,13 @@ void GetChangeStateEventHandle(Service::Interface* self) {
}
void Init() {
AddService(new CECD_S_Interface);
AddService(new CECD_U_Interface);
AddService(new CECD_NDM);
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 =
Kernel::Event::Create(Kernel::ResetType::OneShot, "CECD_U::change_state_event");
Kernel::Event::Create(Kernel::ResetType::OneShot, "CECD::change_state_event");
}
void Shutdown() {

View 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

View 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

View File

@ -2,16 +2,34 @@
// 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_s.h"
namespace Service {
namespace CECD {
// Empty arrays are illegal -- commented out until an entry is added.
// const Interface::FunctionInfo FunctionTable[] = { };
static 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() {
// Register(FunctionTable);
CECD_S::CECD_S() {
Register(FunctionTable);
}
} // namespace CECD

View File

@ -9,9 +9,9 @@
namespace Service {
namespace CECD {
class CECD_S_Interface : public Interface {
class CECD_S : public Interface {
public:
CECD_S_Interface();
CECD_S();
std::string GetPortName() const override {
return "cecd:s";

View File

@ -9,6 +9,7 @@ namespace Service {
namespace CECD {
static const Interface::FunctionInfo FunctionTable[] = {
// cecd:u shared commands
{0x000100C2, nullptr, "OpenRawFile"},
{0x00020042, nullptr, "ReadRawFile"},
{0x00030104, nullptr, "ReadMessage"},
@ -27,7 +28,7 @@ static const Interface::FunctionInfo FunctionTable[] = {
{0x00120104, nullptr, "OpenAndRead"},
};
CECD_U_Interface::CECD_U_Interface() {
CECD_U::CECD_U() {
Register(FunctionTable);
}

View File

@ -9,9 +9,9 @@
namespace Service {
namespace CECD {
class CECD_U_Interface : public Interface {
class CECD_U : public Interface {
public:
CECD_U_Interface();
CECD_U();
std::string GetPortName() const override {
return "cecd:u";