Implement Nfp Finalize and ListDevices
This commit is contained in:
parent
bfb240530f
commit
4c86654c8a
2 changed files with 29 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
enum DeviceState
|
enum DeviceState
|
||||||
{
|
{
|
||||||
Initialized = 0
|
Initialized = 0,
|
||||||
|
Finalized = 6
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -31,6 +31,8 @@ namespace Ryujinx.HLE.HOS.Services.Nfp
|
||||||
_commands = new Dictionary<int, ServiceProcessRequest>
|
_commands = new Dictionary<int, ServiceProcessRequest>
|
||||||
{
|
{
|
||||||
{ 0, Initialize },
|
{ 0, Initialize },
|
||||||
|
{ 1, Finalize },
|
||||||
|
{ 2, ListDevices },
|
||||||
{ 17, AttachActivateEvent },
|
{ 17, AttachActivateEvent },
|
||||||
{ 18, AttachDeactivateEvent },
|
{ 18, AttachDeactivateEvent },
|
||||||
{ 19, GetState },
|
{ 19, GetState },
|
||||||
|
@ -53,6 +55,29 @@ namespace Ryujinx.HLE.HOS.Services.Nfp
|
||||||
return 0;
|
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)
|
public long AttachActivateEvent(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNfp);
|
Logger.PrintStub(LogClass.ServiceNfp);
|
||||||
|
@ -83,7 +108,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfp
|
||||||
|
|
||||||
public long GetState(ServiceCtx context)
|
public long GetState(ServiceCtx context)
|
||||||
{
|
{
|
||||||
context.ResponseData.Write((int)_state);
|
context.ResponseData.Write((uint)_state);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNfp);
|
Logger.PrintStub(LogClass.ServiceNfp);
|
||||||
|
|
||||||
|
@ -92,7 +117,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfp
|
||||||
|
|
||||||
public long GetDeviceState(ServiceCtx context)
|
public long GetDeviceState(ServiceCtx context)
|
||||||
{
|
{
|
||||||
context.ResponseData.Write((int)_deviceState);
|
context.ResponseData.Write((uint)_deviceState);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNfp);
|
Logger.PrintStub(LogClass.ServiceNfp);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue