committed by
GitHub
12 changed files with 170 additions and 12 deletions
-
4src/core/CMakeLists.txt
-
11src/core/hle/service/ptm/ptm.cpp
-
37src/core/hle/service/ptm/ptm_gets.cpp
-
22src/core/hle/service/ptm/ptm_gets.h
-
20src/core/hle/service/ptm/ptm_play.cpp
-
4src/core/hle/service/ptm/ptm_play.h
-
20src/core/hle/service/ptm/ptm_sets.cpp
-
22src/core/hle/service/ptm/ptm_sets.h
-
23src/core/hle/service/ptm/ptm_sysm.cpp
-
13src/core/hle/service/ptm/ptm_sysm.h
-
2src/core/hle/service/ptm/ptm_u.cpp
-
4src/core/hle/service/ptm/ptm_u.h
@ -0,0 +1,37 @@ |
|||||
|
// 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.h"
|
||||
|
#include "core/hle/service/ptm/ptm_gets.h"
|
||||
|
|
||||
|
namespace Service { |
||||
|
namespace PTM { |
||||
|
|
||||
|
const Interface::FunctionInfo FunctionTable[] = { |
||||
|
// ptm:u common commands
|
||||
|
{0x00010002, nullptr, "RegisterAlarmClient"}, |
||||
|
{0x00020080, nullptr, "SetRtcAlarm"}, |
||||
|
{0x00030000, nullptr, "GetRtcAlarm"}, |
||||
|
{0x00040000, nullptr, "CancelRtcAlarm"}, |
||||
|
{0x00050000, GetAdapterState, "GetAdapterState"}, |
||||
|
{0x00060000, GetShellState, "GetShellState"}, |
||||
|
{0x00070000, GetBatteryLevel, "GetBatteryLevel"}, |
||||
|
{0x00080000, GetBatteryChargeState, "GetBatteryChargeState"}, |
||||
|
{0x00090000, nullptr, "GetPedometerState"}, |
||||
|
{0x000A0042, nullptr, "GetStepHistoryEntry"}, |
||||
|
{0x000B00C2, nullptr, "GetStepHistory"}, |
||||
|
{0x000C0000, GetTotalStepCount, "GetTotalStepCount"}, |
||||
|
{0x000D0040, nullptr, "SetPedometerRecordingMode"}, |
||||
|
{0x000E0000, nullptr, "GetPedometerRecordingMode"}, |
||||
|
{0x000F0084, nullptr, "GetStepHistoryAll"}, |
||||
|
// ptm:gets
|
||||
|
{0x04010000, nullptr, "GetSystemTime"}, |
||||
|
}; |
||||
|
|
||||
|
PTM_Gets::PTM_Gets() { |
||||
|
Register(FunctionTable); |
||||
|
} |
||||
|
|
||||
|
} // namespace PTM
|
||||
|
} // namespace Service
|
||||
@ -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 |
||||
@ -0,0 +1,20 @@ |
|||||
|
// 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[] = { |
||||
|
// Note that this service does not have access to ptm:u's common commands
|
||||
|
{0x00010080, nullptr, "SetSystemTime"}, |
||||
|
}; |
||||
|
|
||||
|
PTM_Sets::PTM_Sets() { |
||||
|
Register(FunctionTable); |
||||
|
} |
||||
|
|
||||
|
} // namespace PTM
|
||||
|
} // namespace Service
|
||||
@ -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 |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue