summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Lioncash2016-12-08 05:27:36 -0500
committerGravatar Lioncash2016-12-08 06:13:10 -0500
commit56656b75abf0d5c00b53fb091f17b2aa0d3f1c7c (patch)
tree1a24b668ca050518df82811558839edbd23675c0 /src/core
parentservice: Drop '_Interface' in ptm service class names (diff)
downloadyuzu-56656b75abf0d5c00b53fb091f17b2aa0d3f1c7c.tar.gz
yuzu-56656b75abf0d5c00b53fb091f17b2aa0d3f1c7c.tar.xz
yuzu-56656b75abf0d5c00b53fb091f17b2aa0d3f1c7c.zip
service: Add common ptm:u commands to other ptm services
3dbrew indicates that all services have access to these commands except for ptm:sets.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/ptm/ptm_gets.cpp18
-rw-r--r--src/core/hle/service/ptm/ptm_play.cpp18
-rw-r--r--src/core/hle/service/ptm/ptm_sets.cpp1
-rw-r--r--src/core/hle/service/ptm/ptm_sysm.cpp17
4 files changed, 54 insertions, 0 deletions
diff --git a/src/core/hle/service/ptm/ptm_gets.cpp b/src/core/hle/service/ptm/ptm_gets.cpp
index adf11da47..b23e508d6 100644
--- a/src/core/hle/service/ptm/ptm_gets.cpp
+++ b/src/core/hle/service/ptm/ptm_gets.cpp
@@ -2,12 +2,30 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "core/hle/service/ptm/ptm.h"
5#include "core/hle/service/ptm/ptm_gets.h" 6#include "core/hle/service/ptm/ptm_gets.h"
6 7
7namespace Service { 8namespace Service {
8namespace PTM { 9namespace PTM {
9 10
10const Interface::FunctionInfo FunctionTable[] = { 11const Interface::FunctionInfo FunctionTable[] = {
12 // ptm:u common commands
13 {0x00010002, nullptr, "RegisterAlarmClient"},
14 {0x00020080, nullptr, "SetRtcAlarm"},
15 {0x00030000, nullptr, "GetRtcAlarm"},
16 {0x00040000, nullptr, "CancelRtcAlarm"},
17 {0x00050000, GetAdapterState, "GetAdapterState"},
18 {0x00060000, GetShellState, "GetShellState"},
19 {0x00070000, GetBatteryLevel, "GetBatteryLevel"},
20 {0x00080000, GetBatteryChargeState, "GetBatteryChargeState"},
21 {0x00090000, nullptr, "GetPedometerState"},
22 {0x000A0042, nullptr, "GetStepHistoryEntry"},
23 {0x000B00C2, nullptr, "GetStepHistory"},
24 {0x000C0000, GetTotalStepCount, "GetTotalStepCount"},
25 {0x000D0040, nullptr, "SetPedometerRecordingMode"},
26 {0x000E0000, nullptr, "GetPedometerRecordingMode"},
27 {0x000F0084, nullptr, "GetStepHistoryAll"},
28 // ptm:gets
11 {0x04010000, nullptr, "GetSystemTime"}, 29 {0x04010000, nullptr, "GetSystemTime"},
12}; 30};
13 31
diff --git a/src/core/hle/service/ptm/ptm_play.cpp b/src/core/hle/service/ptm/ptm_play.cpp
index 3fb7e14ca..bcb00e0d4 100644
--- a/src/core/hle/service/ptm/ptm_play.cpp
+++ b/src/core/hle/service/ptm/ptm_play.cpp
@@ -2,12 +2,30 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "core/hle/service/ptm/ptm.h"
5#include "core/hle/service/ptm/ptm_play.h" 6#include "core/hle/service/ptm/ptm_play.h"
6 7
7namespace Service { 8namespace Service {
8namespace PTM { 9namespace PTM {
9 10
10const Interface::FunctionInfo FunctionTable[] = { 11const Interface::FunctionInfo FunctionTable[] = {
12 // ptm:u common commands
13 {0x00010002, nullptr, "RegisterAlarmClient"},
14 {0x00020080, nullptr, "SetRtcAlarm"},
15 {0x00030000, nullptr, "GetRtcAlarm"},
16 {0x00040000, nullptr, "CancelRtcAlarm"},
17 {0x00050000, GetAdapterState, "GetAdapterState"},
18 {0x00060000, GetShellState, "GetShellState"},
19 {0x00070000, GetBatteryLevel, "GetBatteryLevel"},
20 {0x00080000, GetBatteryChargeState, "GetBatteryChargeState"},
21 {0x00090000, nullptr, "GetPedometerState"},
22 {0x000A0042, nullptr, "GetStepHistoryEntry"},
23 {0x000B00C2, nullptr, "GetStepHistory"},
24 {0x000C0000, GetTotalStepCount, "GetTotalStepCount"},
25 {0x000D0040, nullptr, "SetPedometerRecordingMode"},
26 {0x000E0000, nullptr, "GetPedometerRecordingMode"},
27 {0x000F0084, nullptr, "GetStepHistoryAll"},
28 // ptm:play
11 {0x08070082, nullptr, "GetPlayHistory"}, 29 {0x08070082, nullptr, "GetPlayHistory"},
12 {0x08080000, nullptr, "GetPlayHistoryStart"}, 30 {0x08080000, nullptr, "GetPlayHistoryStart"},
13 {0x08090000, nullptr, "GetPlayHistoryLength"}, 31 {0x08090000, nullptr, "GetPlayHistoryLength"},
diff --git a/src/core/hle/service/ptm/ptm_sets.cpp b/src/core/hle/service/ptm/ptm_sets.cpp
index 85823f001..a8c6cf227 100644
--- a/src/core/hle/service/ptm/ptm_sets.cpp
+++ b/src/core/hle/service/ptm/ptm_sets.cpp
@@ -8,6 +8,7 @@ namespace Service {
8namespace PTM { 8namespace PTM {
9 9
10const Interface::FunctionInfo FunctionTable[] = { 10const Interface::FunctionInfo FunctionTable[] = {
11 // Note that this service does not have access to ptm:u's common commands
11 {0x00010080, nullptr, "SetSystemTime"}, 12 {0x00010080, nullptr, "SetSystemTime"},
12}; 13};
13 14
diff --git a/src/core/hle/service/ptm/ptm_sysm.cpp b/src/core/hle/service/ptm/ptm_sysm.cpp
index f6d8c0c82..a5db93e44 100644
--- a/src/core/hle/service/ptm/ptm_sysm.cpp
+++ b/src/core/hle/service/ptm/ptm_sysm.cpp
@@ -9,6 +9,23 @@ namespace Service {
9namespace PTM { 9namespace PTM {
10 10
11const Interface::FunctionInfo FunctionTable[] = { 11const Interface::FunctionInfo FunctionTable[] = {
12 // ptm:u common commands
13 {0x00010002, nullptr, "RegisterAlarmClient"},
14 {0x00020080, nullptr, "SetRtcAlarm"},
15 {0x00030000, nullptr, "GetRtcAlarm"},
16 {0x00040000, nullptr, "CancelRtcAlarm"},
17 {0x00050000, GetAdapterState, "GetAdapterState"},
18 {0x00060000, GetShellState, "GetShellState"},
19 {0x00070000, GetBatteryLevel, "GetBatteryLevel"},
20 {0x00080000, GetBatteryChargeState, "GetBatteryChargeState"},
21 {0x00090000, nullptr, "GetPedometerState"},
22 {0x000A0042, nullptr, "GetStepHistoryEntry"},
23 {0x000B00C2, nullptr, "GetStepHistory"},
24 {0x000C0000, GetTotalStepCount, "GetTotalStepCount"},
25 {0x000D0040, nullptr, "SetPedometerRecordingMode"},
26 {0x000E0000, nullptr, "GetPedometerRecordingMode"},
27 {0x000F0084, nullptr, "GetStepHistoryAll"},
28 // ptm:sysm
12 {0x040100C0, nullptr, "SetRtcAlarmEx"}, 29 {0x040100C0, nullptr, "SetRtcAlarmEx"},
13 {0x04020042, nullptr, "ReplySleepQuery"}, 30 {0x04020042, nullptr, "ReplySleepQuery"},
14 {0x04030042, nullptr, "NotifySleepPreparationComplete"}, 31 {0x04030042, nullptr, "NotifySleepPreparationComplete"},