summaryrefslogtreecommitdiff
path: root/src/core/hle/service/ptm
diff options
context:
space:
mode:
authorGravatar bunnei2017-10-10 17:32:14 -0400
committerGravatar bunnei2017-10-10 17:32:14 -0400
commit0906de9a14b735d1d409290ca050eb7d2c2d3d84 (patch)
tree79bb57d3a4dc4ca377e7a62744c3941de29e785b /src/core/hle/service/ptm
parentMerge remote-tracking branch 'upstream/master' into nx (diff)
downloadyuzu-0906de9a14b735d1d409290ca050eb7d2c2d3d84.tar.gz
yuzu-0906de9a14b735d1d409290ca050eb7d2c2d3d84.tar.xz
yuzu-0906de9a14b735d1d409290ca050eb7d2c2d3d84.zip
hle: Remove a large amount of 3ds-specific service code.
Diffstat (limited to 'src/core/hle/service/ptm')
-rw-r--r--src/core/hle/service/ptm/ptm.cpp166
-rw-r--r--src/core/hle/service/ptm/ptm.h118
-rw-r--r--src/core/hle/service/ptm/ptm_gets.cpp37
-rw-r--r--src/core/hle/service/ptm/ptm_gets.h22
-rw-r--r--src/core/hle/service/ptm/ptm_play.cpp40
-rw-r--r--src/core/hle/service/ptm/ptm_play.h22
-rw-r--r--src/core/hle/service/ptm/ptm_sets.cpp20
-rw-r--r--src/core/hle/service/ptm/ptm_sets.h22
-rw-r--r--src/core/hle/service/ptm/ptm_sysm.cpp71
-rw-r--r--src/core/hle/service/ptm/ptm_sysm.h31
-rw-r--r--src/core/hle/service/ptm/ptm_u.cpp34
-rw-r--r--src/core/hle/service/ptm/ptm_u.h22
12 files changed, 0 insertions, 605 deletions
diff --git a/src/core/hle/service/ptm/ptm.cpp b/src/core/hle/service/ptm/ptm.cpp
deleted file mode 100644
index a0b959797..000000000
--- a/src/core/hle/service/ptm/ptm.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "common/logging/log.h"
6#include "core/file_sys/errors.h"
7#include "core/file_sys/file_backend.h"
8#include "core/hle/service/fs/archive.h"
9#include "core/hle/service/ptm/ptm.h"
10#include "core/hle/service/ptm/ptm_gets.h"
11#include "core/hle/service/ptm/ptm_play.h"
12#include "core/hle/service/ptm/ptm_sets.h"
13#include "core/hle/service/ptm/ptm_sysm.h"
14#include "core/hle/service/ptm/ptm_u.h"
15#include "core/hle/service/service.h"
16#include "core/settings.h"
17
18namespace Service {
19namespace PTM {
20
21/// Values for the default gamecoin.dat file
22static const GameCoin default_game_coin = {0x4F00, 42, 0, 0, 0, 2014, 12, 29};
23
24/// Id of the SharedExtData archive used by the PTM process
25static const std::vector<u8> ptm_shared_extdata_id = {0, 0, 0, 0, 0x0B, 0, 0, 0xF0, 0, 0, 0, 0};
26
27static bool shell_open;
28
29static bool battery_is_charging;
30
31static bool pedometer_is_counting;
32
33void GetAdapterState(Service::Interface* self) {
34 IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x5, 0, 0);
35
36 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
37 rb.Push(RESULT_SUCCESS);
38 rb.Push(battery_is_charging);
39
40 LOG_WARNING(Service_PTM, "(STUBBED) called");
41}
42
43void GetShellState(Service::Interface* self) {
44 IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x6, 0, 0);
45
46 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
47 rb.Push(RESULT_SUCCESS);
48 rb.Push(shell_open);
49}
50
51void GetBatteryLevel(Service::Interface* self) {
52 IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x7, 0, 0);
53
54 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
55 rb.Push(RESULT_SUCCESS);
56 rb.Push(static_cast<u32>(ChargeLevels::CompletelyFull)); // Set to a completely full battery
57
58 LOG_WARNING(Service_PTM, "(STUBBED) called");
59}
60
61void GetBatteryChargeState(Service::Interface* self) {
62 IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x8, 0, 0);
63
64 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
65 rb.Push(RESULT_SUCCESS);
66 rb.Push(battery_is_charging);
67
68 LOG_WARNING(Service_PTM, "(STUBBED) called");
69}
70
71void GetPedometerState(Service::Interface* self) {
72 IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x9, 0, 0);
73
74 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
75 rb.Push(RESULT_SUCCESS);
76 rb.Push(pedometer_is_counting);
77
78 LOG_WARNING(Service_PTM, "(STUBBED) called");
79}
80
81void GetTotalStepCount(Service::Interface* self) {
82 IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0xC, 0, 0);
83
84 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
85 rb.Push(RESULT_SUCCESS);
86 rb.Push<u32>(0);
87
88 LOG_WARNING(Service_PTM, "(STUBBED) called");
89}
90
91void GetSoftwareClosedFlag(Service::Interface* self) {
92 IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x80F, 0, 0);
93
94 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
95 rb.Push(RESULT_SUCCESS);
96 rb.Push(false);
97
98 LOG_WARNING(Service_PTM, "(STUBBED) called");
99}
100
101void CheckNew3DS(IPC::RequestBuilder& rb) {
102 const bool is_new_3ds = Settings::values.is_new_3ds;
103
104 if (is_new_3ds) {
105 LOG_CRITICAL(Service_PTM, "The option 'is_new_3ds' is enabled as part of the 'System' "
106 "settings. Citra does not fully support New 3DS emulation yet!");
107 }
108
109 rb.Push(RESULT_SUCCESS);
110 rb.Push(is_new_3ds);
111
112 LOG_WARNING(Service_PTM, "(STUBBED) called isNew3DS = 0x%08x", static_cast<u32>(is_new_3ds));
113}
114
115void CheckNew3DS(Service::Interface* self) {
116 IPC::RequestBuilder rb(Kernel::GetCommandBuffer(), 0x40A, 0, 0); // 0x040A0000
117 CheckNew3DS(rb);
118}
119
120void Init() {
121 AddService(new PTM_Gets);
122 AddService(new PTM_Play);
123 AddService(new PTM_S);
124 AddService(new PTM_Sets);
125 AddService(new PTM_Sysm);
126 AddService(new PTM_U);
127
128 shell_open = true;
129 battery_is_charging = true;
130 pedometer_is_counting = false;
131
132 // Open the SharedExtSaveData archive 0xF000000B and create the gamecoin.dat file if it doesn't
133 // exist
134 FileSys::Path archive_path(ptm_shared_extdata_id);
135 auto archive_result =
136 Service::FS::OpenArchive(Service::FS::ArchiveIdCode::SharedExtSaveData, archive_path);
137 // If the archive didn't exist, create the files inside
138 if (archive_result.Code() == FileSys::ERR_NOT_FORMATTED) {
139 // Format the archive to create the directories
140 Service::FS::FormatArchive(Service::FS::ArchiveIdCode::SharedExtSaveData,
141 FileSys::ArchiveFormatInfo(), archive_path);
142 // Open it again to get a valid archive now that the folder exists
143 archive_result =
144 Service::FS::OpenArchive(Service::FS::ArchiveIdCode::SharedExtSaveData, archive_path);
145 ASSERT_MSG(archive_result.Succeeded(), "Could not open the PTM SharedExtSaveData archive!");
146
147 FileSys::Path gamecoin_path("/gamecoin.dat");
148 Service::FS::CreateFileInArchive(*archive_result, gamecoin_path, sizeof(GameCoin));
149 FileSys::Mode open_mode = {};
150 open_mode.write_flag.Assign(1);
151 // Open the file and write the default gamecoin information
152 auto gamecoin_result =
153 Service::FS::OpenFileFromArchive(*archive_result, gamecoin_path, open_mode);
154 if (gamecoin_result.Succeeded()) {
155 auto gamecoin = std::move(gamecoin_result).Unwrap();
156 gamecoin->backend->Write(0, sizeof(GameCoin), true,
157 reinterpret_cast<const u8*>(&default_game_coin));
158 gamecoin->backend->Close();
159 }
160 }
161}
162
163void Shutdown() {}
164
165} // namespace PTM
166} // namespace Service
diff --git a/src/core/hle/service/ptm/ptm.h b/src/core/hle/service/ptm/ptm.h
deleted file mode 100644
index e17e59835..000000000
--- a/src/core/hle/service/ptm/ptm.h
+++ /dev/null
@@ -1,118 +0,0 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "common/common_types.h"
8#include "core/hle/ipc_helpers.h"
9
10namespace Service {
11
12class Interface;
13
14namespace PTM {
15
16/// Charge levels used by PTM functions
17enum class ChargeLevels : u32 {
18 CriticalBattery = 1,
19 LowBattery = 2,
20 HalfFull = 3,
21 MostlyFull = 4,
22 CompletelyFull = 5,
23};
24
25/**
26 * Represents the gamecoin file structure in the SharedExtData archive
27 * More information in 3dbrew
28 * (http://www.3dbrew.org/wiki/Extdata#Shared_Extdata_0xf000000b_gamecoin.dat)
29 */
30struct GameCoin {
31 u32 magic; ///< Magic number: 0x4F00
32 u16 total_coins; ///< Total Play Coins
33 u16 total_coins_on_date; ///< Total Play Coins obtained on the date stored below.
34 u32 step_count; ///< Total step count at the time a new Play Coin was obtained.
35 u32 last_step_count; ///< Step count for the day the last Play Coin was obtained
36 u16 year;
37 u8 month;
38 u8 day;
39};
40
41/**
42 * It is unknown if GetAdapterState is the same as GetBatteryChargeState,
43 * it is likely to just be a duplicate function of GetBatteryChargeState
44 * that controls another part of the HW.
45 * PTM::GetAdapterState service function
46 * Outputs:
47 * 1 : Result of function, 0 on success, otherwise error code
48 * 2 : Output of function, 0 = not charging, 1 = charging.
49 */
50void GetAdapterState(Interface* self);
51
52/**
53 * PTM::GetShellState service function.
54 * Outputs:
55 * 1 : Result of function, 0 on success, otherwise error code
56 * 2 : Whether the 3DS's physical shell casing is open (1) or closed (0)
57 */
58void GetShellState(Interface* self);
59
60/**
61 * PTM::GetBatteryLevel service function
62 * Outputs:
63 * 1 : Result of function, 0 on success, otherwise error code
64 * 2 : Battery level, 5 = completely full battery, 4 = mostly full battery,
65 * 3 = half full battery, 2 = low battery, 1 = critical battery.
66 */
67void GetBatteryLevel(Interface* self);
68
69/**
70 * PTM::GetBatteryChargeState service function
71 * Outputs:
72 * 1 : Result of function, 0 on success, otherwise error code
73 * 2 : Output of function, 0 = not charging, 1 = charging.
74 */
75void GetBatteryChargeState(Interface* self);
76
77/**
78 * PTM::GetPedometerState service function
79 * Outputs:
80 * 1 : Result of function, 0 on success, otherwise error code
81 * 2 : Output of function, 0 = not counting steps, 1 = counting steps.
82 */
83void GetPedometerState(Interface* self);
84
85/**
86 * PTM::GetTotalStepCount service function
87 * Outputs:
88 * 1 : Result of function, 0 on success, otherwise error code
89 * 2 : Output of function, * = total step count
90 */
91void GetTotalStepCount(Interface* self);
92
93/**
94 * PTM::GetSoftwareClosedFlag service function
95 * Outputs:
96 * 1: Result code, 0 on success, otherwise error code
97 * 2: Whether or not the "software closed" dialog was requested by the last FIRM
98 * and should be displayed.
99 */
100void GetSoftwareClosedFlag(Interface* self);
101
102/**
103 * PTM::CheckNew3DS service function
104 * Outputs:
105 * 1: Result code, 0 on success, otherwise error code
106 * 2: u8 output: 0 = Old3DS, 1 = New3DS.
107 */
108void CheckNew3DS(Interface* self);
109void CheckNew3DS(IPC::RequestBuilder& rb);
110
111/// Initialize the PTM service
112void Init();
113
114/// Shutdown the PTM service
115void Shutdown();
116
117} // namespace PTM
118} // namespace Service
diff --git a/src/core/hle/service/ptm/ptm_gets.cpp b/src/core/hle/service/ptm/ptm_gets.cpp
deleted file mode 100644
index b23e508d6..000000000
--- a/src/core/hle/service/ptm/ptm_gets.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
1// Copyright 2016 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/ptm/ptm.h"
6#include "core/hle/service/ptm/ptm_gets.h"
7
8namespace Service {
9namespace PTM {
10
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
29 {0x04010000, nullptr, "GetSystemTime"},
30};
31
32PTM_Gets::PTM_Gets() {
33 Register(FunctionTable);
34}
35
36} // namespace PTM
37} // namespace Service
diff --git a/src/core/hle/service/ptm/ptm_gets.h b/src/core/hle/service/ptm/ptm_gets.h
deleted file mode 100644
index 5552c9eff..000000000
--- a/src/core/hle/service/ptm/ptm_gets.h
+++ /dev/null
@@ -1,22 +0,0 @@
1// Copyright 2016 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service {
10namespace PTM {
11
12class PTM_Gets final : public Interface {
13public:
14 PTM_Gets();
15
16 std::string GetPortName() const override {
17 return "ptm:gets";
18 }
19};
20
21} // namespace PTM
22} // namespace Service
diff --git a/src/core/hle/service/ptm/ptm_play.cpp b/src/core/hle/service/ptm/ptm_play.cpp
deleted file mode 100644
index bcb00e0d4..000000000
--- a/src/core/hle/service/ptm/ptm_play.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/ptm/ptm.h"
6#include "core/hle/service/ptm/ptm_play.h"
7
8namespace Service {
9namespace PTM {
10
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
29 {0x08070082, nullptr, "GetPlayHistory"},
30 {0x08080000, nullptr, "GetPlayHistoryStart"},
31 {0x08090000, nullptr, "GetPlayHistoryLength"},
32 {0x080B0080, nullptr, "CalcPlayHistoryStart"},
33};
34
35PTM_Play::PTM_Play() {
36 Register(FunctionTable);
37}
38
39} // namespace PTM
40} // namespace Service \ No newline at end of file
diff --git a/src/core/hle/service/ptm/ptm_play.h b/src/core/hle/service/ptm/ptm_play.h
deleted file mode 100644
index 663faabee..000000000
--- a/src/core/hle/service/ptm/ptm_play.h
+++ /dev/null
@@ -1,22 +0,0 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service {
10namespace PTM {
11
12class PTM_Play final : public Interface {
13public:
14 PTM_Play();
15
16 std::string GetPortName() const override {
17 return "ptm:play";
18 }
19};
20
21} // namespace PTM
22} // namespace Service
diff --git a/src/core/hle/service/ptm/ptm_sets.cpp b/src/core/hle/service/ptm/ptm_sets.cpp
deleted file mode 100644
index a8c6cf227..000000000
--- a/src/core/hle/service/ptm/ptm_sets.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
1// Copyright 2016 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/ptm/ptm_sets.h"
6
7namespace Service {
8namespace PTM {
9
10const Interface::FunctionInfo FunctionTable[] = {
11 // Note that this service does not have access to ptm:u's common commands
12 {0x00010080, nullptr, "SetSystemTime"},
13};
14
15PTM_Sets::PTM_Sets() {
16 Register(FunctionTable);
17}
18
19} // namespace PTM
20} // namespace Service
diff --git a/src/core/hle/service/ptm/ptm_sets.h b/src/core/hle/service/ptm/ptm_sets.h
deleted file mode 100644
index d33b047e5..000000000
--- a/src/core/hle/service/ptm/ptm_sets.h
+++ /dev/null
@@ -1,22 +0,0 @@
1// Copyright 2016 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service {
10namespace PTM {
11
12class PTM_Sets final : public Interface {
13public:
14 PTM_Sets();
15
16 std::string GetPortName() const override {
17 return "ptm:sets";
18 }
19};
20
21} // namespace PTM
22} // namespace Service
diff --git a/src/core/hle/service/ptm/ptm_sysm.cpp b/src/core/hle/service/ptm/ptm_sysm.cpp
deleted file mode 100644
index f95dfdbb1..000000000
--- a/src/core/hle/service/ptm/ptm_sysm.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/ptm/ptm.h"
6#include "core/hle/service/ptm/ptm_sysm.h"
7
8namespace Service {
9namespace PTM {
10
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
29 {0x040100C0, nullptr, "SetRtcAlarmEx"},
30 {0x04020042, nullptr, "ReplySleepQuery"},
31 {0x04030042, nullptr, "NotifySleepPreparationComplete"},
32 {0x04040102, nullptr, "SetWakeupTrigger"},
33 {0x04050000, nullptr, "GetAwakeReason"},
34 {0x04060000, nullptr, "RequestSleep"},
35 {0x040700C0, nullptr, "ShutdownAsync"},
36 {0x04080000, nullptr, "Awake"},
37 {0x04090080, nullptr, "RebootAsync"},
38 {0x040A0000, CheckNew3DS, "CheckNew3DS"},
39 {0x08010640, nullptr, "SetInfoLEDPattern"},
40 {0x08020040, nullptr, "SetInfoLEDPatternHeader"},
41 {0x08030000, nullptr, "GetInfoLEDStatus"},
42 {0x08040040, nullptr, "SetBatteryEmptyLEDPattern"},
43 {0x08050000, nullptr, "ClearStepHistory"},
44 {0x080600C2, nullptr, "SetStepHistory"},
45 {0x08070082, nullptr, "GetPlayHistory"},
46 {0x08080000, nullptr, "GetPlayHistoryStart"},
47 {0x08090000, nullptr, "GetPlayHistoryLength"},
48 {0x080A0000, nullptr, "ClearPlayHistory"},
49 {0x080B0080, nullptr, "CalcPlayHistoryStart"},
50 {0x080C0080, nullptr, "SetUserTime"},
51 {0x080D0000, nullptr, "InvalidateSystemTime"},
52 {0x080E0140, nullptr, "NotifyPlayEvent"},
53 {0x080F0000, GetSoftwareClosedFlag, "GetSoftwareClosedFlag"},
54 {0x08100000, nullptr, "ClearSoftwareClosedFlag"},
55 {0x08110000, GetShellState, "GetShellState"},
56 {0x08120000, nullptr, "IsShutdownByBatteryEmpty"},
57 {0x08130000, nullptr, "FormatSavedata"},
58 {0x08140000, nullptr, "GetLegacyJumpProhibitedFlag"},
59 {0x08180040, nullptr, "ConfigureNew3DSCPU"},
60};
61
62PTM_S::PTM_S() {
63 Register(FunctionTable);
64}
65
66PTM_Sysm::PTM_Sysm() {
67 Register(FunctionTable);
68}
69
70} // namespace PTM
71} // namespace Service
diff --git a/src/core/hle/service/ptm/ptm_sysm.h b/src/core/hle/service/ptm/ptm_sysm.h
deleted file mode 100644
index 8afcebbba..000000000
--- a/src/core/hle/service/ptm/ptm_sysm.h
+++ /dev/null
@@ -1,31 +0,0 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service {
10namespace PTM {
11
12class PTM_S final : public Interface {
13public:
14 PTM_S();
15
16 std::string GetPortName() const override {
17 return "ptm:s";
18 }
19};
20
21class PTM_Sysm final : public Interface {
22public:
23 PTM_Sysm();
24
25 std::string GetPortName() const override {
26 return "ptm:sysm";
27 }
28};
29
30} // namespace PTM
31} // namespace Service
diff --git a/src/core/hle/service/ptm/ptm_u.cpp b/src/core/hle/service/ptm/ptm_u.cpp
deleted file mode 100644
index 696a58a36..000000000
--- a/src/core/hle/service/ptm/ptm_u.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/ptm/ptm.h"
6#include "core/hle/service/ptm/ptm_u.h"
7
8namespace Service {
9namespace PTM {
10
11const Interface::FunctionInfo FunctionTable[] = {
12 {0x00010002, nullptr, "RegisterAlarmClient"},
13 {0x00020080, nullptr, "SetRtcAlarm"},
14 {0x00030000, nullptr, "GetRtcAlarm"},
15 {0x00040000, nullptr, "CancelRtcAlarm"},
16 {0x00050000, GetAdapterState, "GetAdapterState"},
17 {0x00060000, GetShellState, "GetShellState"},
18 {0x00070000, GetBatteryLevel, "GetBatteryLevel"},
19 {0x00080000, GetBatteryChargeState, "GetBatteryChargeState"},
20 {0x00090000, GetPedometerState, "GetPedometerState"},
21 {0x000A0042, nullptr, "GetStepHistoryEntry"},
22 {0x000B00C2, nullptr, "GetStepHistory"},
23 {0x000C0000, GetTotalStepCount, "GetTotalStepCount"},
24 {0x000D0040, nullptr, "SetPedometerRecordingMode"},
25 {0x000E0000, nullptr, "GetPedometerRecordingMode"},
26 {0x000F0084, nullptr, "GetStepHistoryAll"},
27};
28
29PTM_U::PTM_U() {
30 Register(FunctionTable);
31}
32
33} // namespace PTM
34} // namespace Service
diff --git a/src/core/hle/service/ptm/ptm_u.h b/src/core/hle/service/ptm/ptm_u.h
deleted file mode 100644
index 7b75d6e49..000000000
--- a/src/core/hle/service/ptm/ptm_u.h
+++ /dev/null
@@ -1,22 +0,0 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service {
10namespace PTM {
11
12class PTM_U final : public Interface {
13public:
14 PTM_U();
15
16 std::string GetPortName() const override {
17 return "ptm:u";
18 }
19};
20
21} // namespace PTM
22} // namespace Service \ No newline at end of file