From 6d28b643126ee5de476a89f3ff94b5cc3ead3970 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Fri, 5 Apr 2024 20:45:43 +0200 Subject: ts: Migrate service to Horizon project (#6514) * ts: Migrate service to Horizon project This PR migrate the `ts` service (stored in `ptm`) to the Horizon project: - It stubs all known IPCs. - IpcServer consts are checked by RE. Closes #6480 * Fix args --- .../HOS/Services/Ptm/Ts/IMeasurementServer.cs | 39 ---------------------- .../HOS/Services/Ptm/Ts/Types/Location.cs | 8 ----- 2 files changed, 47 deletions(-) delete mode 100644 src/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs delete mode 100644 src/Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs (limited to 'src/Ryujinx.HLE/HOS') diff --git a/src/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs b/src/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs deleted file mode 100644 index 66ffd0a4..00000000 --- a/src/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Ryujinx.Common.Logging; -using Ryujinx.HLE.HOS.Services.Ptm.Ts.Types; - -namespace Ryujinx.HLE.HOS.Services.Ptm.Ts -{ - [Service("ts")] - class IMeasurementServer : IpcService - { - private const uint DefaultTemperature = 42u; - - public IMeasurementServer(ServiceCtx context) { } - - [CommandCmif(1)] - // GetTemperature(Location location) -> u32 - public ResultCode GetTemperature(ServiceCtx context) - { - Location location = (Location)context.RequestData.ReadByte(); - - Logger.Stub?.PrintStub(LogClass.ServicePtm, new { location }); - - context.ResponseData.Write(DefaultTemperature); - - return ResultCode.Success; - } - - [CommandCmif(3)] - // GetTemperatureMilliC(Location location) -> u32 - public ResultCode GetTemperatureMilliC(ServiceCtx context) - { - Location location = (Location)context.RequestData.ReadByte(); - - Logger.Stub?.PrintStub(LogClass.ServicePtm, new { location }); - - context.ResponseData.Write(DefaultTemperature * 1000); - - return ResultCode.Success; - } - } -} diff --git a/src/Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs b/src/Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs deleted file mode 100644 index 409188a9..00000000 --- a/src/Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Ptm.Ts.Types -{ - enum Location : byte - { - Internal, - External, - } -} -- cgit v1.2.3