From 41c03f481a6d95dab830d6ecf6e563ff7284dc9a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 8 Dec 2016 05:17:19 -0500 Subject: service: Add ptm::gets and ptm::sets services --- src/core/hle/service/ptm/ptm.cpp | 4 ++++ src/core/hle/service/ptm/ptm_gets.cpp | 19 +++++++++++++++++++ src/core/hle/service/ptm/ptm_gets.h | 22 ++++++++++++++++++++++ src/core/hle/service/ptm/ptm_sets.cpp | 19 +++++++++++++++++++ src/core/hle/service/ptm/ptm_sets.h | 22 ++++++++++++++++++++++ 5 files changed, 86 insertions(+) create mode 100644 src/core/hle/service/ptm/ptm_gets.cpp create mode 100644 src/core/hle/service/ptm/ptm_gets.h create mode 100644 src/core/hle/service/ptm/ptm_sets.cpp create mode 100644 src/core/hle/service/ptm/ptm_sets.h (limited to 'src/core/hle/service') diff --git a/src/core/hle/service/ptm/ptm.cpp b/src/core/hle/service/ptm/ptm.cpp index 6a9f1d24d..771fd1323 100644 --- a/src/core/hle/service/ptm/ptm.cpp +++ b/src/core/hle/service/ptm/ptm.cpp @@ -6,7 +6,9 @@ #include "core/file_sys/file_backend.h" #include "core/hle/service/fs/archive.h" #include "core/hle/service/ptm/ptm.h" +#include "core/hle/service/ptm/ptm_gets.h" #include "core/hle/service/ptm/ptm_play.h" +#include "core/hle/service/ptm/ptm_sets.h" #include "core/hle/service/ptm/ptm_sysm.h" #include "core/hle/service/ptm/ptm_u.h" #include "core/hle/service/service.h" @@ -106,7 +108,9 @@ void CheckNew3DS(Service::Interface* self) { } void Init() { + AddService(new PTM_Gets()); AddService(new PTM_Play_Interface); + AddService(new PTM_Sets()); AddService(new PTM_Sysm_Interface); AddService(new PTM_U_Interface); diff --git a/src/core/hle/service/ptm/ptm_gets.cpp b/src/core/hle/service/ptm/ptm_gets.cpp new file mode 100644 index 000000000..adf11da47 --- /dev/null +++ b/src/core/hle/service/ptm/ptm_gets.cpp @@ -0,0 +1,19 @@ +// Copyright 2016 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/ptm/ptm_gets.h" + +namespace Service { +namespace PTM { + +const Interface::FunctionInfo FunctionTable[] = { + {0x04010000, nullptr, "GetSystemTime"}, +}; + +PTM_Gets::PTM_Gets() { + Register(FunctionTable); +} + +} // namespace PTM +} // namespace Service diff --git a/src/core/hle/service/ptm/ptm_gets.h b/src/core/hle/service/ptm/ptm_gets.h new file mode 100644 index 000000000..5552c9eff --- /dev/null +++ b/src/core/hle/service/ptm/ptm_gets.h @@ -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 PTM { + +class PTM_Gets final : public Interface { +public: + PTM_Gets(); + + std::string GetPortName() const override { + return "ptm:gets"; + } +}; + +} // namespace PTM +} // namespace Service diff --git a/src/core/hle/service/ptm/ptm_sets.cpp b/src/core/hle/service/ptm/ptm_sets.cpp new file mode 100644 index 000000000..85823f001 --- /dev/null +++ b/src/core/hle/service/ptm/ptm_sets.cpp @@ -0,0 +1,19 @@ +// Copyright 2016 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/ptm/ptm_sets.h" + +namespace Service { +namespace PTM { + +const Interface::FunctionInfo FunctionTable[] = { + {0x00010080, nullptr, "SetSystemTime"}, +}; + +PTM_Sets::PTM_Sets() { + Register(FunctionTable); +} + +} // namespace PTM +} // namespace Service diff --git a/src/core/hle/service/ptm/ptm_sets.h b/src/core/hle/service/ptm/ptm_sets.h new file mode 100644 index 000000000..d33b047e5 --- /dev/null +++ b/src/core/hle/service/ptm/ptm_sets.h @@ -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 PTM { + +class PTM_Sets final : public Interface { +public: + PTM_Sets(); + + std::string GetPortName() const override { + return "ptm:sets"; + } +}; + +} // namespace PTM +} // namespace Service -- cgit v1.2.3