Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ccf23fc629 | ||
|
f1460d5494 |
@@ -71,7 +71,7 @@ namespace ARMeilleure.Instructions
|
|||||||
|
|
||||||
SetFlag(context, PState.TFlag, bitOne);
|
SetFlag(context, PState.TFlag, bitOne);
|
||||||
|
|
||||||
EmitVirtualCall(context, addr);
|
EmitBxWritePc(context, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Bx(ArmEmitterContext context)
|
public static void Bx(ArmEmitterContext context)
|
||||||
|
@@ -186,7 +186,7 @@ namespace ARMeilleure.Instructions
|
|||||||
|
|
||||||
SetFlag(context, PState.TFlag, mode);
|
SetFlag(context, PState.TFlag, mode);
|
||||||
|
|
||||||
Operand addr = context.ConditionalSelect(mode, pc, context.BitwiseAnd(pc, Const(~3)));
|
Operand addr = context.ConditionalSelect(mode, context.BitwiseAnd(pc, Const(~1)), context.BitwiseAnd(pc, Const(~3)));
|
||||||
|
|
||||||
InstEmitFlowHelper.EmitVirtualJump(context, addr, isReturn);
|
InstEmitFlowHelper.EmitVirtualJump(context, addr, isReturn);
|
||||||
}
|
}
|
||||||
|
@@ -242,15 +242,18 @@ namespace Ryujinx.Ui.App
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Store the ControlFS in variable called controlFs
|
|
||||||
GetControlFsAndTitleId(pfs, out IFileSystem controlFs, out titleId);
|
GetControlFsAndTitleId(pfs, out IFileSystem controlFs, out titleId);
|
||||||
|
|
||||||
|
// Check if there is an update available.
|
||||||
|
if (IsUpdateApplied(titleId, out IFileSystem updatedControlFs))
|
||||||
|
{
|
||||||
|
// Replace the original ControlFs by the updated one.
|
||||||
|
controlFs = updatedControlFs;
|
||||||
|
}
|
||||||
|
|
||||||
ReadControlData(controlFs, controlHolder.ByteSpan);
|
ReadControlData(controlFs, controlHolder.ByteSpan);
|
||||||
|
|
||||||
// Get the title name, title ID, developer name and version number from the NACP
|
GetGameInformation(ref controlHolder.Value, out titleName, out _, out developer, out version);
|
||||||
version = IsUpdateApplied(titleId, out string updateVersion) ? updateVersion : controlHolder.Value.DisplayVersion.ToString();
|
|
||||||
|
|
||||||
GetNameIdDeveloper(ref controlHolder.Value, out titleName, out _, out developer);
|
|
||||||
|
|
||||||
// Read the icon from the ControlFS and store it as a byte array
|
// Read the icon from the ControlFS and store it as a byte array
|
||||||
try
|
try
|
||||||
@@ -351,10 +354,7 @@ namespace Ryujinx.Ui.App
|
|||||||
// Read the NACP data
|
// Read the NACP data
|
||||||
Read(assetOffset + (int)nacpOffset, (int)nacpSize).AsSpan().CopyTo(controlHolder.ByteSpan);
|
Read(assetOffset + (int)nacpOffset, (int)nacpSize).AsSpan().CopyTo(controlHolder.ByteSpan);
|
||||||
|
|
||||||
// Get the title name, title ID, developer name and version number from the NACP
|
GetGameInformation(ref controlHolder.Value, out titleName, out titleId, out developer, out version);
|
||||||
version = controlHolder.Value.DisplayVersion.ToString();
|
|
||||||
|
|
||||||
GetNameIdDeveloper(ref controlHolder.Value, out titleName, out titleId, out developer);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -554,7 +554,7 @@ namespace Ryujinx.Ui.App
|
|||||||
return readableString;
|
return readableString;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GetNameIdDeveloper(ref ApplicationControlProperty controlData, out string titleName, out string titleId, out string publisher)
|
private void GetGameInformation(ref ApplicationControlProperty controlData, out string titleName, out string titleId, out string publisher, out string version)
|
||||||
{
|
{
|
||||||
_ = Enum.TryParse(_desiredTitleLanguage.ToString(), out TitleLanguage desiredTitleLanguage);
|
_ = Enum.TryParse(_desiredTitleLanguage.ToString(), out TitleLanguage desiredTitleLanguage);
|
||||||
|
|
||||||
@@ -611,10 +611,14 @@ namespace Ryujinx.Ui.App
|
|||||||
{
|
{
|
||||||
titleId = "0000000000000000";
|
titleId = "0000000000000000";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
version = controlData.DisplayVersion.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsUpdateApplied(string titleId, out string version)
|
private bool IsUpdateApplied(string titleId, out IFileSystem updatedControlFs)
|
||||||
{
|
{
|
||||||
|
updatedControlFs = null;
|
||||||
|
|
||||||
string updatePath = "(unknown)";
|
string updatePath = "(unknown)";
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -623,14 +627,7 @@ namespace Ryujinx.Ui.App
|
|||||||
|
|
||||||
if (patchNca != null && controlNca != null)
|
if (patchNca != null && controlNca != null)
|
||||||
{
|
{
|
||||||
ApplicationControlProperty controlData = new ApplicationControlProperty();
|
updatedControlFs = controlNca?.OpenFileSystem(NcaSectionType.Data, IntegrityCheckLevel.None);
|
||||||
using var nacpFile = new UniqueRef<IFile>();
|
|
||||||
|
|
||||||
controlNca.OpenFileSystem(NcaSectionType.Data, IntegrityCheckLevel.None).OpenFile(ref nacpFile.Ref(), "/control.nacp".ToU8Span(), OpenMode.Read).ThrowIfFailure();
|
|
||||||
|
|
||||||
nacpFile.Get.Read(out _, 0, SpanHelpers.AsByteSpan(ref controlData), ReadOption.None).ThrowIfFailure();
|
|
||||||
|
|
||||||
version = controlData.DisplayVersion.ToString();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -645,8 +642,6 @@ namespace Ryujinx.Ui.App
|
|||||||
Logger.Warning?.Print(LogClass.Application, $"Your key set is missing a key with the name: {exception.Name}. Errored File: {updatePath}");
|
Logger.Warning?.Print(LogClass.Application, $"Your key set is missing a key with the name: {exception.Name}. Errored File: {updatePath}");
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "";
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user