diff --git a/Ryujinx.HLE/HOS/Services/Nfp/DeviceState.cs b/Ryujinx.HLE/HOS/Services/Nfp/DeviceState.cs index 0452789362..cc76a5d9ed 100644 --- a/Ryujinx.HLE/HOS/Services/Nfp/DeviceState.cs +++ b/Ryujinx.HLE/HOS/Services/Nfp/DeviceState.cs @@ -2,6 +2,7 @@ { enum DeviceState { - Initialized = 0 + Initialized = 0, + Finalized = 6 } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Nfp/IUser.cs b/Ryujinx.HLE/HOS/Services/Nfp/IUser.cs index 66bff1a7e1..20c2bf876f 100644 --- a/Ryujinx.HLE/HOS/Services/Nfp/IUser.cs +++ b/Ryujinx.HLE/HOS/Services/Nfp/IUser.cs @@ -31,6 +31,8 @@ namespace Ryujinx.HLE.HOS.Services.Nfp _commands = new Dictionary { { 0, Initialize }, + { 1, Finalize }, + { 2, ListDevices }, { 17, AttachActivateEvent }, { 18, AttachDeactivateEvent }, { 19, GetState }, @@ -53,6 +55,29 @@ namespace Ryujinx.HLE.HOS.Services.Nfp return 0; } + public long Finalize(ServiceCtx context) + { + Logger.PrintStub(LogClass.ServiceNfp); + + _deviceState = DeviceState.Finalized; + + return 0; + } + + public long ListDevices(ServiceCtx context) + { + uint arraySize = context.RequestData.ReadUInt32(); + + Logger.PrintStub(LogClass.ServiceNfp, new { arraySize }); + + (long replyPos, long replySize) = context.Request.GetBufferType0x22(); + + context.ResponseData.Write(1u); + context.Memory.WriteUInt32(replyPos, 0u); + + return 0; + } + public long AttachActivateEvent(ServiceCtx context) { Logger.PrintStub(LogClass.ServiceNfp); @@ -83,7 +108,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfp public long GetState(ServiceCtx context) { - context.ResponseData.Write((int)_state); + context.ResponseData.Write((uint)_state); Logger.PrintStub(LogClass.ServiceNfp); @@ -92,7 +117,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfp public long GetDeviceState(ServiceCtx context) { - context.ResponseData.Write((int)_deviceState); + context.ResponseData.Write((uint)_deviceState); Logger.PrintStub(LogClass.ServiceNfp);