Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
50458b2472 | ||
|
dda0f26067 | ||
|
4e1a60328e | ||
|
2505a1abcd | ||
|
bc4d99a078 |
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@@ -7,7 +7,7 @@ updates:
|
||||
labels:
|
||||
- "infra"
|
||||
reviewers:
|
||||
- marysaka
|
||||
- TSRBerry
|
||||
commit-message:
|
||||
prefix: "ci"
|
||||
|
||||
@@ -19,7 +19,7 @@ updates:
|
||||
labels:
|
||||
- "infra"
|
||||
reviewers:
|
||||
- marysaka
|
||||
- TSRBerry
|
||||
commit-message:
|
||||
prefix: nuget
|
||||
groups:
|
||||
|
7
.github/reviewers.yml
vendored
7
.github/reviewers.yml
vendored
@@ -1,31 +1,24 @@
|
||||
audio:
|
||||
- marysaka
|
||||
|
||||
cpu:
|
||||
- gdkchan
|
||||
- riperiperi
|
||||
- marysaka
|
||||
- LDj3SNuD
|
||||
|
||||
gpu:
|
||||
- gdkchan
|
||||
- riperiperi
|
||||
- marysaka
|
||||
|
||||
gui:
|
||||
- Ack77
|
||||
- emmauss
|
||||
- TSRBerry
|
||||
- marysaka
|
||||
|
||||
horizon:
|
||||
- gdkchan
|
||||
- Ack77
|
||||
- marysaka
|
||||
- TSRBerry
|
||||
|
||||
infra:
|
||||
- marysaka
|
||||
- TSRBerry
|
||||
|
||||
default:
|
||||
|
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@@ -44,6 +44,17 @@ jobs:
|
||||
sha: context.sha
|
||||
})
|
||||
|
||||
- name: Create release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
name: ${{ steps.version_info.outputs.build_version }}
|
||||
tag: ${{ steps.version_info.outputs.build_version }}
|
||||
body: "For more information about this release please check out the official [Changelog](https://github.com/Ryujinx/Ryujinx/wiki/Changelog)."
|
||||
omitBodyDuringUpdate: true
|
||||
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
|
||||
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
release:
|
||||
name: Release for ${{ matrix.platform.name }}
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
|
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace Ryujinx.Common.Utilities
|
||||
{
|
||||
@@ -44,5 +46,11 @@ namespace Ryujinx.Common.Utilities
|
||||
CopyDirectory(sourceDir, destinationDir, true);
|
||||
Directory.Delete(sourceDir, true);
|
||||
}
|
||||
|
||||
public static string SanitizeFileName(string fileName)
|
||||
{
|
||||
var reservedChars = new HashSet<char>(Path.GetInvalidFileNameChars());
|
||||
return string.Concat(fileName.Select(c => reservedChars.Contains(c) ? '_' : c));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1106,6 +1106,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm64
|
||||
case InstName.Mrs:
|
||||
case InstName.MsrImm:
|
||||
case InstName.MsrReg:
|
||||
case InstName.Sysl:
|
||||
return true;
|
||||
}
|
||||
|
||||
|
48
src/Ryujinx.Cpu/LightningJit/Arm64/SysUtils.cs
Normal file
48
src/Ryujinx.Cpu/LightningJit/Arm64/SysUtils.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Ryujinx.Cpu.LightningJit.Arm64
|
||||
{
|
||||
static class SysUtils
|
||||
{
|
||||
public static (uint, uint, uint, uint) UnpackOp1CRnCRmOp2(uint encoding)
|
||||
{
|
||||
uint op1 = (encoding >> 16) & 7;
|
||||
uint crn = (encoding >> 12) & 0xf;
|
||||
uint crm = (encoding >> 8) & 0xf;
|
||||
uint op2 = (encoding >> 5) & 7;
|
||||
|
||||
return (op1, crn, crm, op2);
|
||||
}
|
||||
|
||||
public static bool IsCacheInstEl0(uint encoding)
|
||||
{
|
||||
(uint op1, uint crn, uint crm, uint op2) = UnpackOp1CRnCRmOp2(encoding);
|
||||
|
||||
return ((op1 << 11) | (crn << 7) | (crm << 3) | op2) switch
|
||||
{
|
||||
0b011_0111_0100_001 => true, // DC ZVA
|
||||
0b011_0111_1010_001 => true, // DC CVAC
|
||||
0b011_0111_1100_001 => true, // DC CVAP
|
||||
0b011_0111_1011_001 => true, // DC CVAU
|
||||
0b011_0111_1110_001 => true, // DC CIVAC
|
||||
0b011_0111_0101_001 => true, // IC IVAU
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
||||
public static bool IsCacheInstUciTrapped(uint encoding)
|
||||
{
|
||||
(uint op1, uint crn, uint crm, uint op2) = UnpackOp1CRnCRmOp2(encoding);
|
||||
|
||||
return ((op1 << 11) | (crn << 7) | (crm << 3) | op2) switch
|
||||
{
|
||||
0b011_0111_1010_001 => true, // DC CVAC
|
||||
0b011_0111_1100_001 => true, // DC CVAP
|
||||
0b011_0111_1011_001 => true, // DC CVAU
|
||||
0b011_0111_1110_001 => true, // DC CIVAC
|
||||
0b011_0111_0101_001 => true, // IC IVAU
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@@ -257,7 +257,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
|
||||
|
||||
(name, flags, AddressForm addressForm) = InstTable.GetInstNameAndFlags(encoding, cpuPreset.Version, cpuPreset.Features);
|
||||
|
||||
if (name.IsPrivileged())
|
||||
if (name.IsPrivileged() || (name == InstName.Sys && IsPrivilegedSys(encoding)))
|
||||
{
|
||||
name = InstName.UdfPermUndef;
|
||||
flags = InstFlags.None;
|
||||
@@ -341,6 +341,11 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
|
||||
return new(startAddress, address, insts, !isTruncated && !name.IsException(), isTruncated, isLoopEnd);
|
||||
}
|
||||
|
||||
private static bool IsPrivilegedSys(uint encoding)
|
||||
{
|
||||
return !SysUtils.IsCacheInstEl0(encoding);
|
||||
}
|
||||
|
||||
private static bool IsMrsNzcv(uint encoding)
|
||||
{
|
||||
return (encoding & ~0x1fu) == 0xd53b4200u;
|
||||
|
@@ -13,6 +13,14 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
|
||||
|
||||
public static void RewriteSysInstruction(int asBits, MemoryManagerType mmType, CodeWriter writer, RegisterAllocator regAlloc, uint encoding)
|
||||
{
|
||||
// TODO: Handle IC instruction, it should invalidate the JIT cache.
|
||||
|
||||
if (InstEmitSystem.IsCacheInstForbidden(encoding))
|
||||
{
|
||||
// Current OS does not allow cache maintenance instructions from user mode, just do nothing.
|
||||
return;
|
||||
}
|
||||
|
||||
int rtIndex = RegisterUtils.ExtractRt(encoding);
|
||||
if (rtIndex == RegisterUtils.ZrIndex)
|
||||
{
|
||||
|
@@ -69,7 +69,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
|
||||
asm.LdrRiUn(Register((int)rd), Register(regAlloc.FixedContextRegister), NativeContextOffsets.TpidrEl0Offset);
|
||||
}
|
||||
}
|
||||
else if ((encoding & ~0x1f) == 0xd53b0020 && IsAppleOS()) // mrs x0, ctr_el0
|
||||
else if ((encoding & ~0x1f) == 0xd53b0020 && IsCtrEl0AccessForbidden()) // mrs x0, ctr_el0
|
||||
{
|
||||
uint rd = encoding & 0x1f;
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ((encoding & ~0x1f) == 0xd53b0020 && IsAppleOS()) // mrs x0, ctr_el0
|
||||
else if ((encoding & ~0x1f) == 0xd53b0020 && IsCtrEl0AccessForbidden()) // mrs x0, ctr_el0
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -127,9 +127,16 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool IsAppleOS()
|
||||
private static bool IsCtrEl0AccessForbidden()
|
||||
{
|
||||
return OperatingSystem.IsMacOS() || OperatingSystem.IsIOS();
|
||||
// Only Linux allows accessing CTR_EL0 from user mode.
|
||||
return OperatingSystem.IsWindows() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS();
|
||||
}
|
||||
|
||||
public static bool IsCacheInstForbidden(uint encoding)
|
||||
{
|
||||
// Windows does not allow the cache maintenance instructions to be used from user mode.
|
||||
return OperatingSystem.IsWindows() && SysUtils.IsCacheInstUciTrapped(encoding);
|
||||
}
|
||||
|
||||
public static bool NeedsContextStoreLoad(InstName name)
|
||||
|
@@ -3,6 +3,7 @@ using Gtk;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Common.Utilities;
|
||||
using Ryujinx.Graphics.GAL;
|
||||
using Ryujinx.Graphics.GAL.Multithreading;
|
||||
using Ryujinx.Graphics.Gpu;
|
||||
@@ -378,8 +379,12 @@ namespace Ryujinx.UI
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
var currentTime = DateTime.Now;
|
||||
string filename = $"ryujinx_capture_{currentTime.Year}-{currentTime.Month:D2}-{currentTime.Day:D2}_{currentTime.Hour:D2}-{currentTime.Minute:D2}-{currentTime.Second:D2}.png";
|
||||
string applicationName = Device.Processes.ActiveApplication.Name;
|
||||
string sanitizedApplicationName = FileSystemUtils.SanitizeFileName(applicationName);
|
||||
DateTime currentTime = DateTime.Now;
|
||||
|
||||
string filename = $"{sanitizedApplicationName}_{currentTime.Year}-{currentTime.Month:D2}-{currentTime.Day:D2}_{currentTime.Hour:D2}-{currentTime.Minute:D2}-{currentTime.Second:D2}.png";
|
||||
|
||||
string directory = AppDataManager.Mode switch
|
||||
{
|
||||
AppDataManager.LaunchMode.Portable or AppDataManager.LaunchMode.Custom => System.IO.Path.Combine(AppDataManager.BaseDirPath, "screenshots"),
|
||||
|
@@ -22,6 +22,7 @@ using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Configuration.Multiplayer;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Common.SystemInterop;
|
||||
using Ryujinx.Common.Utilities;
|
||||
using Ryujinx.Graphics.GAL;
|
||||
using Ryujinx.Graphics.GAL.Multithreading;
|
||||
using Ryujinx.Graphics.Gpu;
|
||||
@@ -279,8 +280,11 @@ namespace Ryujinx.Ava
|
||||
{
|
||||
lock (_lockObject)
|
||||
{
|
||||
string applicationName = Device.Processes.ActiveApplication.Name;
|
||||
string sanitizedApplicationName = FileSystemUtils.SanitizeFileName(applicationName);
|
||||
DateTime currentTime = DateTime.Now;
|
||||
string filename = $"ryujinx_capture_{currentTime.Year}-{currentTime.Month:D2}-{currentTime.Day:D2}_{currentTime.Hour:D2}-{currentTime.Minute:D2}-{currentTime.Second:D2}.png";
|
||||
|
||||
string filename = $"{sanitizedApplicationName}_{currentTime.Year}-{currentTime.Month:D2}-{currentTime.Day:D2}_{currentTime.Hour:D2}-{currentTime.Minute:D2}-{currentTime.Second:D2}.png";
|
||||
|
||||
string directory = AppDataManager.Mode switch
|
||||
{
|
||||
|
@@ -14,8 +14,8 @@
|
||||
WindowState="{Binding WindowState}"
|
||||
Width="{Binding WindowWidth}"
|
||||
Height="{Binding WindowHeight}"
|
||||
MinWidth="1092"
|
||||
MinHeight="672"
|
||||
MinWidth="800"
|
||||
MinHeight="500"
|
||||
d:DesignHeight="720"
|
||||
d:DesignWidth="1280"
|
||||
x:DataType="viewModels:MainWindowViewModel"
|
||||
|
Reference in New Issue
Block a user