Initial support for the new 12.x IPC system (#2182)

* Rename CommandAttribute as CommandHIpcAttribute to prepare for 12.x changes

* Implement inital support for TIPC and adds SM command ids

* *Ipc to *ipc

* Missed a ref in last commit...

* CommandAttributeTIpc to CommandAttributeTipc

* Addresses comment and fixes some bugs around

TIPC doesn't have any padding requirements as buffer C isn't a thing
Fix for RegisterService inverting two argument only on TIPC
This commit is contained in:
Mary 2021-04-14 00:01:24 +02:00 committed by GitHub
parent faa654dbaf
commit 0746b83edf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
132 changed files with 1077 additions and 951 deletions

View file

@ -9,7 +9,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings
{
public ISettingsServer(ServiceCtx context) { }
[Command(0)]
[CommandHipc(0)]
// GetLanguageCode() -> nn::settings::LanguageCode
public ResultCode GetLanguageCode(ServiceCtx context)
{
@ -18,7 +18,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings
return ResultCode.Success;
}
[Command(1)]
[CommandHipc(1)]
// GetAvailableLanguageCodes() -> (u32, buffer<nn::settings::LanguageCode, 0xa>)
public ResultCode GetAvailableLanguageCodes(ServiceCtx context)
{
@ -29,7 +29,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings
0xF);
}
[Command(2)] // 4.0.0+
[CommandHipc(2)] // 4.0.0+
// MakeLanguageCode(nn::settings::Language language_index) -> nn::settings::LanguageCode
public ResultCode MakeLanguageCode(ServiceCtx context)
{
@ -45,7 +45,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings
return ResultCode.Success;
}
[Command(3)]
[CommandHipc(3)]
// GetAvailableLanguageCodeCount() -> u32
public ResultCode GetAvailableLanguageCodeCount(ServiceCtx context)
{
@ -54,7 +54,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings
return ResultCode.Success;
}
[Command(4)]
[CommandHipc(4)]
// GetRegionCode() -> u32 nn::settings::RegionCode
public ResultCode GetRegionCode(ServiceCtx context)
{
@ -72,7 +72,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings
return ResultCode.Success;
}
[Command(5)]
[CommandHipc(5)]
// GetAvailableLanguageCodes2() -> (u32, buffer<nn::settings::LanguageCode, 6>)
public ResultCode GetAvailableLanguageCodes2(ServiceCtx context)
{
@ -83,7 +83,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings
SystemStateMgr.LanguageCodes.Length);
}
[Command(6)]
[CommandHipc(6)]
// GetAvailableLanguageCodeCount2() -> u32
public ResultCode GetAvailableLanguageCodeCount2(ServiceCtx context)
{
@ -92,14 +92,14 @@ namespace Ryujinx.HLE.HOS.Services.Settings
return ResultCode.Success;
}
[Command(7)] // 4.0.0+
[CommandHipc(7)] // 4.0.0+
// GetKeyCodeMap() -> buffer<nn::kpr::KeyCodeMap, 0x16>
public ResultCode GetKeyCodeMap(ServiceCtx context)
{
return GetKeyCodeMapImpl(context, 1);
}
[Command(8)] // 5.0.0+
[CommandHipc(8)] // 5.0.0+
// GetQuestFlag() -> bool
public ResultCode GetQuestFlag(ServiceCtx context)
{
@ -110,7 +110,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings
return ResultCode.Success;
}
[Command(9)] // 6.0.0+
[CommandHipc(9)] // 6.0.0+
// GetKeyCodeMap2() -> buffer<nn::kpr::KeyCodeMap, 0x16>
public ResultCode GetKeyCodeMap2(ServiceCtx context)
{