Refactoring HOS folder structure (#771)

* Refactoring HOS folder structure

Refactoring HOS folder structure:

- Added some subfolders when needed (Following structure decided in private).
- Added some `Types` folders when needed.
- Little cleanup here and there.
- Add services placeholders for every HOS services (close #766 and #753).

* Remove Types namespaces
This commit is contained in:
Ac_K 2019-09-19 02:45:11 +02:00 committed by jduncanator
parent 4af3101b22
commit a0720b5681
393 changed files with 2540 additions and 1299 deletions

View file

@ -0,0 +1,8 @@
namespace Ryujinx.HLE.HOS.Services.Pcv.Bpc
{
[Service("bpc")]
class IBoardPowerControlManager : IpcService
{
public IBoardPowerControlManager(ServiceCtx context) { }
}
}

View file

@ -0,0 +1,34 @@
using System;
namespace Ryujinx.HLE.HOS.Services.Pcv.Bpc
{
[Service("bpc:r")] // 1.0.0 - 8.1.0
class IRtcManager : IpcService
{
public IRtcManager(ServiceCtx context) { }
[Command(0)]
// GetRtcTime() -> u64
public ResultCode GetRtcTime(ServiceCtx context)
{
ResultCode result = GetExternalRtcValue(out ulong rtcValue);
if (result == ResultCode.Success)
{
context.ResponseData.Write(rtcValue);
}
return result;
}
public static ResultCode GetExternalRtcValue(out ulong rtcValue)
{
// TODO: emulate MAX77620/MAX77812 RTC
DateTime unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
rtcValue = (ulong)(DateTime.Now.ToUniversalTime() - unixEpoch).TotalSeconds;
return ResultCode.Success;
}
}
}

View file

@ -0,0 +1,8 @@
namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst
{
[Service("clkrst:a")] // 8.0.0+
class IArbitrationManager : IpcService
{
public IArbitrationManager(ServiceCtx context) { }
}
}

View file

@ -0,0 +1,9 @@
namespace Ryujinx.HLE.HOS.Services.Pcv.Clkrst
{
[Service("clkrst")] // 8.0.0+
[Service("clkrst:i")] // 8.0.0+
class IClkrstManager : IpcService
{
public IClkrstManager(ServiceCtx context) { }
}
}

View file

@ -0,0 +1,8 @@
namespace Ryujinx.HLE.HOS.Services.Pcv
{
[Service("pcv")]
class IPcvService : IpcService
{
public IPcvService(ServiceCtx context) { }
}
}

View file

@ -0,0 +1,8 @@
namespace Ryujinx.HLE.HOS.Services.Pcv.Rgltr
{
[Service("rgltr")] // 8.0.0+
class IRegulatorManager : IpcService
{
public IRegulatorManager(ServiceCtx context) { }
}
}

View file

@ -0,0 +1,8 @@
namespace Ryujinx.HLE.HOS.Services.Pcv.Rtc
{
[Service("rtc")] // 8.0.0+
class IUnknown1 : IpcService
{
public IUnknown1(ServiceCtx context) { }
}
}