From 55e0c714898cc331173628714bdc8e64fb9a3756 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Thu, 24 Jun 2021 01:05:40 +0200 Subject: [PATCH] nfc/nfp: Implement ISystemManager and ISystem (#2381) * nfc/nfp: Implement ISystemManager and ISystem This PR add permission levels for `nfc` and `nfp` services: - `nfc`: `CreateUserInterface` and `CreateSystemInterface` are implemented. - `INfc`: `Initialize` and `IsNfcEnabled` calls are stubbed. - `nfp`: `CreateDebugInterface` and `CreateSystemInterface` are implemented. - `INfp`: `GetRegisterInfo2` for `IDebug` and `ISystem` are implemented. * Addresses gdkchan feedback --- Ryujinx.Common/Logging/LogClass.cs | 1 + Ryujinx.HLE/HOS/Horizon.cs | 2 +- .../HOS/Services/Nfc/ISystemManager.cs | 13 ++++++- Ryujinx.HLE/HOS/Services/Nfc/IUserManager.cs | 13 ++++++- .../HOS/Services/Nfc/NfcManager/INfc.cs | 37 +++++++++++++++++++ .../NfcManager/Types/NfcPermissionLevel.cs | 8 ++++ .../HOS/Services/Nfc/Nfp/IDebugManager.cs | 13 ++++++- .../HOS/Services/Nfc/Nfp/ISystemManager.cs | 13 ++++++- .../HOS/Services/Nfc/Nfp/IUserManager.cs | 8 ++-- .../IUser.cs => NfpManager/INfp.cs} | 31 +++++++++++++--- .../Types/AmiiboConstants.cs | 2 +- .../Types/CommonInfo.cs | 2 +- .../Nfc/Nfp/NfpManager/Types/DeviceType.cs | 7 ++++ .../Types/ModelInfo.cs | 2 +- .../Types/MountTarget.cs | 2 +- .../Types/NfpDevice.cs | 2 +- .../Types/NfpDeviceState.cs | 2 +- .../NfpManager/Types/NfpPermissionLevel.cs | 9 +++++ .../Types/RegisterInfo.cs | 4 +- .../Types/State.cs | 2 +- .../Types/TagInfo.cs | 2 +- .../Types/VirtualAmiiboFile.cs | 2 +- .../Nfc/Nfp/UserManager/Types/DeviceType.cs | 7 ---- .../HOS/Services/Nfc/Nfp/VirtualAmiibo.cs | 2 +- 24 files changed, 153 insertions(+), 33 deletions(-) create mode 100644 Ryujinx.HLE/HOS/Services/Nfc/NfcManager/INfc.cs create mode 100644 Ryujinx.HLE/HOS/Services/Nfc/NfcManager/Types/NfcPermissionLevel.cs rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager/IUser.cs => NfpManager/INfp.cs} (97%) rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager => NfpManager}/Types/AmiiboConstants.cs (72%) rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager => NfpManager}/Types/CommonInfo.cs (89%) create mode 100644 Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/DeviceType.cs rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager => NfpManager}/Types/ModelInfo.cs (88%) rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager => NfpManager}/Types/MountTarget.cs (61%) rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager => NfpManager}/Types/NfpDevice.cs (91%) rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager => NfpManager}/Types/NfpDeviceState.cs (80%) create mode 100644 Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpPermissionLevel.cs rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager => NfpManager}/Types/RegisterInfo.cs (84%) rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager => NfpManager}/Types/State.cs (59%) rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager => NfpManager}/Types/TagInfo.cs (87%) rename Ryujinx.HLE/HOS/Services/Nfc/Nfp/{UserManager => NfpManager}/Types/VirtualAmiiboFile.cs (92%) delete mode 100644 Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/DeviceType.cs diff --git a/Ryujinx.Common/Logging/LogClass.cs b/Ryujinx.Common/Logging/LogClass.cs index 28b344cd..c2d2f55e 100644 --- a/Ryujinx.Common/Logging/LogClass.cs +++ b/Ryujinx.Common/Logging/LogClass.cs @@ -38,6 +38,7 @@ namespace Ryujinx.Common.Logging ServiceLdr, ServiceLm, ServiceMm, + ServiceNfc, ServiceNfp, ServiceNgct, ServiceNifm, diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs index b8343cd1..3034d107 100644 --- a/Ryujinx.HLE/HOS/Horizon.cs +++ b/Ryujinx.HLE/HOS/Horizon.cs @@ -22,7 +22,7 @@ using Ryujinx.HLE.HOS.Services.Arp; using Ryujinx.HLE.HOS.Services.Audio.AudioRenderer; using Ryujinx.HLE.HOS.Services.Caps; using Ryujinx.HLE.HOS.Services.Mii; -using Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager; +using Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager; using Ryujinx.HLE.HOS.Services.Nv; using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl; using Ryujinx.HLE.HOS.Services.Pcv.Bpc; diff --git a/Ryujinx.HLE/HOS/Services/Nfc/ISystemManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/ISystemManager.cs index 0bab0b79..9072ed83 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/ISystemManager.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/ISystemManager.cs @@ -1,8 +1,19 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc +using Ryujinx.HLE.HOS.Services.Nfc.NfcManager; + +namespace Ryujinx.HLE.HOS.Services.Nfc { [Service("nfc:sys")] class ISystemManager : IpcService { public ISystemManager(ServiceCtx context) { } + + [CommandHipc(0)] + // CreateSystemInterface() -> object + public ResultCode CreateSystemInterface(ServiceCtx context) + { + MakeObject(context, new INfc(NfcPermissionLevel.System)); + + return ResultCode.Success; + } } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/IUserManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/IUserManager.cs index 048adf8c..5f0ccf14 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/IUserManager.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/IUserManager.cs @@ -1,8 +1,19 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc +using Ryujinx.HLE.HOS.Services.Nfc.NfcManager; + +namespace Ryujinx.HLE.HOS.Services.Nfc { [Service("nfc:user")] class IUserManager : IpcService { public IUserManager(ServiceCtx context) { } + + [CommandHipc(0)] + // CreateUserInterface() -> object + public ResultCode CreateUserInterface(ServiceCtx context) + { + MakeObject(context, new INfc(NfcPermissionLevel.User)); + + return ResultCode.Success; + } } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/NfcManager/INfc.cs b/Ryujinx.HLE/HOS/Services/Nfc/NfcManager/INfc.cs new file mode 100644 index 00000000..f2fc867d --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/NfcManager/INfc.cs @@ -0,0 +1,37 @@ +using Ryujinx.Common.Logging; + +namespace Ryujinx.HLE.HOS.Services.Nfc.NfcManager +{ + class INfc : IpcService + { + private NfcPermissionLevel _permissionLevel; + + public INfc(NfcPermissionLevel permissionLevel) + { + _permissionLevel = permissionLevel; + } + + [CommandHipc(0)] + [CommandHipc(400)] // 4.0.0+ + // Initialize() + public ResultCode Initialize(ServiceCtx context) + { + Logger.Stub?.PrintStub(LogClass.ServiceNfc, new { _permissionLevel }); + + return ResultCode.Success; + } + + [CommandHipc(3)] + [CommandHipc(403)] // 4.0.0+ + // IsNfcEnabled() -> b8 + public ResultCode IsNfcEnabled(ServiceCtx context) + { + // NOTE: Write false value here could make nfp service not called. + context.ResponseData.Write(true); + + Logger.Stub?.PrintStub(LogClass.ServiceNfc, new { _permissionLevel }); + + return ResultCode.Success; + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/NfcManager/Types/NfcPermissionLevel.cs b/Ryujinx.HLE/HOS/Services/Nfc/NfcManager/Types/NfcPermissionLevel.cs new file mode 100644 index 00000000..39babc73 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/NfcManager/Types/NfcPermissionLevel.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Nfc.NfcManager +{ + enum NfcPermissionLevel + { + User, + System + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IDebugManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IDebugManager.cs index c5da8da9..2faf489c 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IDebugManager.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IDebugManager.cs @@ -1,8 +1,19 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp +using Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager; + +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp { [Service("nfp:dbg")] class IAmManager : IpcService { public IAmManager(ServiceCtx context) { } + + [CommandHipc(0)] + // CreateDebugInterface() -> object + public ResultCode CreateDebugInterface(ServiceCtx context) + { + MakeObject(context, new INfp(NfpPermissionLevel.Debug)); + + return ResultCode.Success; + } } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/ISystemManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/ISystemManager.cs index 78ea4896..ed4c7bbf 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/ISystemManager.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/ISystemManager.cs @@ -1,8 +1,19 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp +using Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager; + +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp { [Service("nfp:sys")] class ISystemManager : IpcService { public ISystemManager(ServiceCtx context) { } + + [CommandHipc(0)] + // CreateSystemInterface() -> object + public ResultCode CreateSystemInterface(ServiceCtx context) + { + MakeObject(context, new INfp(NfpPermissionLevel.System)); + + return ResultCode.Success; + } } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IUserManager.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IUserManager.cs index 5f70758b..09df720a 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IUserManager.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/IUserManager.cs @@ -1,4 +1,6 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp +using Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager; + +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp { [Service("nfp:user")] class IUserManager : IpcService @@ -7,9 +9,9 @@ [CommandHipc(0)] // CreateUserInterface() -> object - public ResultCode GetUserInterface(ServiceCtx context) + public ResultCode CreateUserInterface(ServiceCtx context) { - MakeObject(context, new IUser()); + MakeObject(context, new INfp(NfpPermissionLevel.User)); return ResultCode.Success; } diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/IUser.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/INfp.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/IUser.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/INfp.cs index f241c311..6b4ea5ef 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/IUser.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/INfp.cs @@ -6,7 +6,7 @@ using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services.Hid; using Ryujinx.HLE.HOS.Services.Hid.HidServer; -using Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager; +using Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager; using System; using System.Buffers.Binary; using System.Globalization; @@ -16,7 +16,7 @@ using System.Threading.Tasks; namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp { - class IUser : IpcService + class INfp : IpcService { private ulong _appletResourceUserId; private ulong _mcuVersionData; @@ -28,7 +28,12 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp private CancellationTokenSource _cancelTokenSource; - public IUser() { } + private NfpPermissionLevel _permissionLevel; + + public INfp(NfpPermissionLevel permissionLevel) + { + _permissionLevel = permissionLevel; + } [CommandHipc(0)] // Initialize(u64, u64, pid, buffer) @@ -213,9 +218,9 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp return resultCode; } - uint deviceHandle = (uint)context.RequestData.ReadUInt64(); - UserManager.DeviceType deviceType = (UserManager.DeviceType)context.RequestData.ReadUInt32(); - MountTarget mountTarget = (MountTarget)context.RequestData.ReadUInt32(); + uint deviceHandle = (uint)context.RequestData.ReadUInt64(); + DeviceType deviceType = (DeviceType)context.RequestData.ReadUInt32(); + MountTarget mountTarget = (MountTarget)context.RequestData.ReadUInt32(); if (deviceType != 0) { @@ -969,6 +974,20 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp throw new ServiceNotImplementedException(this, context, false); } + [CommandHipc(102)] + // GetRegisterInfo2(bytes<8, 4>) -> buffer, 0x1a> + public ResultCode GetRegisterInfo2(ServiceCtx context) + { + // TODO: Find the differencies between IUser and ISystem/IDebug. + + if (_permissionLevel == NfpPermissionLevel.Debug || _permissionLevel == NfpPermissionLevel.System) + { + return GetRegisterInfo(context); + } + + return ResultCode.DeviceNotFound; + } + private ResultCode CheckNfcIsEnabled() { // TODO: Call nn::settings::detail::GetNfcEnableFlag when it will be implemented. diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/AmiiboConstants.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/AmiiboConstants.cs similarity index 72% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/AmiiboConstants.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/AmiiboConstants.cs index 47f6f0fa..b06492e6 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/AmiiboConstants.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/AmiiboConstants.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { static class AmiiboConstants { diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/CommonInfo.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/CommonInfo.cs similarity index 89% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/CommonInfo.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/CommonInfo.cs index da055dc3..a7976de9 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/CommonInfo.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/CommonInfo.cs @@ -1,7 +1,7 @@ using Ryujinx.Common.Memory; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { [StructLayout(LayoutKind.Sequential, Size = 0x40)] struct CommonInfo diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/DeviceType.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/DeviceType.cs new file mode 100644 index 00000000..096522a0 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/DeviceType.cs @@ -0,0 +1,7 @@ +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager +{ + enum DeviceType : uint + { + Amiibo + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/ModelInfo.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/ModelInfo.cs similarity index 88% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/ModelInfo.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/ModelInfo.cs index 1b6a3d32..c66636ae 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/ModelInfo.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/ModelInfo.cs @@ -1,7 +1,7 @@ using Ryujinx.Common.Memory; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { [StructLayout(LayoutKind.Sequential, Size = 0x40)] struct ModelInfo diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/MountTarget.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/MountTarget.cs similarity index 61% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/MountTarget.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/MountTarget.cs index 11520bc6..4a145773 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/MountTarget.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/MountTarget.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { enum MountTarget : uint { diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/NfpDevice.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpDevice.cs similarity index 91% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/NfpDevice.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpDevice.cs index b0d9c806..f56d33a9 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/NfpDevice.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpDevice.cs @@ -1,7 +1,7 @@ using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services.Hid; -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { class NfpDevice { diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/NfpDeviceState.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpDeviceState.cs similarity index 80% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/NfpDeviceState.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpDeviceState.cs index 0e753250..51e1d060 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/NfpDeviceState.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpDeviceState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { enum NfpDeviceState { diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpPermissionLevel.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpPermissionLevel.cs new file mode 100644 index 00000000..8b84dcfe --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpPermissionLevel.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager +{ + enum NfpPermissionLevel + { + Debug, + User, + System + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/RegisterInfo.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/RegisterInfo.cs similarity index 84% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/RegisterInfo.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/RegisterInfo.cs index 3c72a971..6b30eb8e 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/RegisterInfo.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/RegisterInfo.cs @@ -2,7 +2,7 @@ using Ryujinx.HLE.HOS.Services.Mii.Types; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { [StructLayout(LayoutKind.Sequential, Size = 0x100)] struct RegisterInfo @@ -11,7 +11,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager public ushort FirstWriteYear; public byte FirstWriteMonth; public byte FirstWriteDay; - public Array11 Nickname; + public Array41 Nickname; public byte FontRegion; public Array64 Reserved1; public Array58 Reserved2; diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/State.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/State.cs similarity index 59% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/State.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/State.cs index 8d141f0b..b38cf9e2 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/State.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/State.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { enum State { diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/TagInfo.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/TagInfo.cs similarity index 87% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/TagInfo.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/TagInfo.cs index 950f8c10..d2076b2a 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/TagInfo.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/TagInfo.cs @@ -1,7 +1,7 @@ using Ryujinx.Common.Memory; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { [StructLayout(LayoutKind.Sequential, Size = 0x58)] struct TagInfo diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/VirtualAmiiboFile.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/VirtualAmiiboFile.cs similarity index 92% rename from Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/VirtualAmiiboFile.cs rename to Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/VirtualAmiiboFile.cs index 5265c038..be1877e5 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/VirtualAmiiboFile.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/VirtualAmiiboFile.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager +namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { struct VirtualAmiiboFile { diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/DeviceType.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/DeviceType.cs deleted file mode 100644 index 753b91a9..00000000 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/UserManager/Types/DeviceType.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager -{ - enum DeviceType : uint - { - Amiibo - } -} \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs index bd810d96..2617dfb5 100644 --- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs +++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs @@ -2,7 +2,7 @@ using Ryujinx.Common.Memory; using Ryujinx.HLE.HOS.Services.Mii; using Ryujinx.HLE.HOS.Services.Mii.Types; -using Ryujinx.HLE.HOS.Services.Nfc.Nfp.UserManager; +using Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager; using System; using System.Collections.Generic; using System.IO;