Implement ContentManager and related services (#438)

* Implement contentmanager and related services

* small changes

* read system firmware version from nand

* add pfs support, write directoryentry info for romfs files

* add file check in fsp-srv:8

* add support for open fs of internal files

* fix filename when accessing pfs

* use switch style paths for contentpath

* close nca after verifying type

* removed publishing profiles, align directory entry

* fix style

* lots of style fixes

* yasf(yet another style fix)

* yasf(yet another style fix) plus symbols

* enforce path check on every fs access

* change enum type to default

* fix typo
This commit is contained in:
emmauss 2018-11-18 21:37:41 +02:00 committed by gdkchan
parent e603b7afbc
commit fe8fbb6fb9
38 changed files with 2179 additions and 173 deletions

View file

@ -32,6 +32,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
this.HostPath = HostPath;
}
// Read(u32, u64 offset, u64 size) -> (u64 out_size, buffer<u8, 0x46, 0> out_buf)
public long Read(ServiceCtx Context)
{
long Position = Context.Request.ReceiveBuff[0].Position;
@ -53,6 +54,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
return 0;
}
// Write(u32, u64 offset, u64 size, buffer<u8, 0x45, 0>)
public long Write(ServiceCtx Context)
{
long Position = Context.Request.SendBuff[0].Position;
@ -69,6 +71,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
return 0;
}
// Flush()
public long Flush(ServiceCtx Context)
{
BaseStream.Flush();
@ -76,6 +79,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
return 0;
}
// SetSize(u64 size)
public long SetSize(ServiceCtx Context)
{
long Size = Context.RequestData.ReadInt64();
@ -85,6 +89,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
return 0;
}
// GetSize() -> u64 fileSize
public long GetSize(ServiceCtx Context)
{
Context.ResponseData.Write(BaseStream.Length);