diff --git a/.editorconfig b/.editorconfig
index 0f9dd369a..1059bcdeb 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -45,10 +45,10 @@ dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = false
# this. and Me. preferences
-dotnet_style_qualification_for_event = false:suggestion
-dotnet_style_qualification_for_field = false:suggestion
-dotnet_style_qualification_for_method = false:suggestion
-dotnet_style_qualification_for_property = false:suggestion
+dotnet_style_qualification_for_event = false:silent
+dotnet_style_qualification_for_field = false:silent
+dotnet_style_qualification_for_method = false:silent
+dotnet_style_qualification_for_property = false:silent
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
@@ -257,14 +257,12 @@ csharp_prefer_system_threading_lock = true:suggestion
dotnet_diagnostic.CA1069.severity = none # CA1069: Enums values should not be duplicated
# Disable Collection initialization can be simplified
dotnet_diagnostic.IDE0028.severity = none
-dotnet_diagnostic.IDE0079.severity = none # IDE0079: Remove unnecessary suppression
-dotnet_diagnostic.IDE0130.severity = none # IDE0130: Namespace does not match folder structure
dotnet_diagnostic.IDE0300.severity = none
dotnet_diagnostic.IDE0301.severity = none
dotnet_diagnostic.IDE0302.severity = none
dotnet_diagnostic.IDE0305.severity = none
dotnet_diagnostic.CS9113.severity = none # CS9113: Parameter 'value' is unread
-dotnet_diagnostic.CS0649.severity = none # CS0649: Field is never assigned to, and will always have its default value
+dotnet_diagnostic.IDE0130.severity = none # IDE0130: Namespace does not match folder structure
[src/Ryujinx/UI/ViewModels/**.cs]
# Disable "mark members as static" rule for ViewModels
diff --git a/Ryujinx.sln b/Ryujinx.sln
index 9ed282d09..4babf3fb9 100644
--- a/Ryujinx.sln
+++ b/Ryujinx.sln
@@ -77,6 +77,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon.Kernel.Gene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.HLE.Generators", "src\Ryujinx.HLE.Generators\Ryujinx.HLE.Generators.csproj", "{B575BCDE-2FD8-4A5D-8756-31CDD7FE81F0}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryujinx.BuildValidationTasks", "src\Ryujinx.BuildValidationTasks\Ryujinx.BuildValidationTasks.csproj", "{4A89A234-4F19-497D-A576-DDE8CDFC5B22}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{36F870C1-3E5F-485F-B426-F0645AF78751}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
@@ -84,10 +86,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.github\workflows\canary.yml = .github\workflows\canary.yml
Directory.Packages.props = Directory.Packages.props
.github\workflows\release.yml = .github\workflows\release.yml
+ nuget.config = nuget.config
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryujinx.BuildValidationTasks", "src\Ryujinx.BuildValidationTasks\Ryujinx.BuildValidationTasks.csproj", "{4A89A234-4F19-497D-A576-DDE8CDFC5B22}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
diff --git a/assets/locales.json b/assets/locales.json
index a53c0047a..1158fd5a0 100644
--- a/assets/locales.json
+++ b/assets/locales.json
@@ -4009,7 +4009,7 @@
"he_IL": "",
"it_IT": "",
"ja_JP": "",
- "ko_KR": "Ryujinx 1.1.1403을 연상시키는 이전 Avalonia Ryujinx UI를 표시합니다. 이 기능은 Windows가 아닌 플랫폼에서는 기본적으로 활성화됩니다.\n 클래식 스타일의 타이틀 바가 돌아왔고 주요 창 레이아웃 재작업이 역전되었습니다. 이 툴팁 위의 설정 탐색 배치와 같은 작업입니다.",
+ "ko_KR": "Ryujinx 1.1.1403을 연상시키는 이전 Avalonia Ryujinx UI를 표시합니다. 이 기능은 윈도가 아닌 플랫폼에서는 기본적으로 활성화됩니다.\n 클래식 스타일의 타이틀 바가 돌아왔고 주요 창 레이아웃 변경 사항이 원래대로 적용됩니다. 이 툴팁 위의 설정 탐색 배치와 같은 경우입니다.",
"no_NO": "Vis det eldre Avalonia Ryujinx-grensesnittet som minner om Ryujinx 1.1.1403. Dette er aktivert som standard på plattformer som ikke er Windows.\nTittellinjen i klassisk stil er tilbake, og store omarbeidinger av vindusoppsettet er reversert, for eksempel plasseringen av innstillingsnavigasjonen over dette verktøytipset.",
"pl_PL": "",
"pt_BR": "Mostrar a Interface Avalonia antiga do Ryujinx 1.1.1403. Esta versão é ativada por padrão nas plataformas que não sejam Windows. \nO estilo clássico da Barra de Título retorna e grande parte das mudanças do Layout de janela são revertidas; assim como as configurações de posicionamento da navegação acima dessa descrição.",
diff --git a/docs/compatibility.csv b/docs/compatibility.csv
index 684fc7833..56d737aa2 100644
--- a/docs/compatibility.csv
+++ b/docs/compatibility.csv
@@ -2746,6 +2746,7 @@
01005D701264A000,"SpyHack",,playable,2021-04-15 10:53:51
010077B00E046000,"Spyro™ Reignited Trilogy",nvdec;UE4,playable,2022-09-11 18:38:33
0100085012A0E000,"Squeakers",,playable,2020-12-13 12:13:05
+0100E1D01EB2E000,"Squeakross: Home Squeak Home",,playable,2025-06-16 02:02:00
010009300D31C000,"Squidgies Takeover",,playable,2020-07-20 22:28:08
0100FCD0102EC000,"Squidlit",,playable,2020-08-06 12:38:32
0100EBF00E702000,"STAR OCEAN First Departure R",nvdec,playable,2021-07-05 19:29:16
diff --git a/nuget.config b/nuget.config
index 4e51027dc..77eadcf88 100644
--- a/nuget.config
+++ b/nuget.config
@@ -8,4 +8,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ARMeilleure/CodeGen/Arm64/Assembler.cs b/src/ARMeilleure/CodeGen/Arm64/Assembler.cs
index 38398fb6a..0d493426b 100644
--- a/src/ARMeilleure/CodeGen/Arm64/Assembler.cs
+++ b/src/ARMeilleure/CodeGen/Arm64/Assembler.cs
@@ -1129,6 +1129,7 @@ namespace ARMeilleure.CodeGen.Arm64
};
}
+#pragma warning disable IDE0051 // Remove unused private member
private void WriteInt16(short value)
{
WriteUInt16((ushort)value);
@@ -1143,6 +1144,7 @@ namespace ARMeilleure.CodeGen.Arm64
{
_stream.WriteByte(value);
}
+#pragma warning restore IDE0051
private void WriteUInt16(ushort value)
{
diff --git a/src/ARMeilleure/CodeGen/Arm64/CodeGenerator.cs b/src/ARMeilleure/CodeGen/Arm64/CodeGenerator.cs
index e2ac49b23..fbf4c1eb4 100644
--- a/src/ARMeilleure/CodeGen/Arm64/CodeGenerator.cs
+++ b/src/ARMeilleure/CodeGen/Arm64/CodeGenerator.cs
@@ -1570,11 +1570,13 @@ namespace ARMeilleure.CodeGen.Arm64
Debug.Assert(op1.Type == op3.Type);
}
+#pragma warning disable IDE0051 // Remove unused private member
private static void EnsureSameType(Operand op1, Operand op2, Operand op3, Operand op4)
{
Debug.Assert(op1.Type == op2.Type);
Debug.Assert(op1.Type == op3.Type);
Debug.Assert(op1.Type == op4.Type);
}
+#pragma warning restore IDE0051
}
}
diff --git a/src/ARMeilleure/CodeGen/X86/AssemblerTable.cs b/src/ARMeilleure/CodeGen/X86/AssemblerTable.cs
index ddceae057..4b226803b 100644
--- a/src/ARMeilleure/CodeGen/X86/AssemblerTable.cs
+++ b/src/ARMeilleure/CodeGen/X86/AssemblerTable.cs
@@ -1,4 +1,5 @@
using System;
+using System.Diagnostics.CodeAnalysis;
namespace ARMeilleure.CodeGen.X86
{
diff --git a/src/ARMeilleure/CodeGen/X86/CallingConvention.cs b/src/ARMeilleure/CodeGen/X86/CallingConvention.cs
index 02b91c163..8433aaea9 100644
--- a/src/ARMeilleure/CodeGen/X86/CallingConvention.cs
+++ b/src/ARMeilleure/CodeGen/X86/CallingConvention.cs
@@ -20,12 +20,12 @@ namespace ARMeilleure.CodeGen.X86
{
if (GetCurrentCallConv() == CallConvName.Windows)
{
-
+#pragma warning disable IDE0055 // Disable formatting
return (1 << (int)X86Register.Rax) |
(1 << (int)X86Register.Rcx) |
(1 << (int)X86Register.Rdx) |
- (1 << (int)X86Register.R8) |
- (1 << (int)X86Register.R9) |
+ (1 << (int)X86Register.R8) |
+ (1 << (int)X86Register.R9) |
(1 << (int)X86Register.R10) |
(1 << (int)X86Register.R11);
}
@@ -36,11 +36,11 @@ namespace ARMeilleure.CodeGen.X86
(1 << (int)X86Register.Rdx) |
(1 << (int)X86Register.Rsi) |
(1 << (int)X86Register.Rdi) |
- (1 << (int)X86Register.R8) |
- (1 << (int)X86Register.R9) |
+ (1 << (int)X86Register.R8) |
+ (1 << (int)X86Register.R9) |
(1 << (int)X86Register.R10) |
(1 << (int)X86Register.R11);
-
+#pragma warning restore IDE0055
}
}
diff --git a/src/ARMeilleure/CodeGen/X86/CodeGenContext.cs b/src/ARMeilleure/CodeGen/X86/CodeGenContext.cs
index 6d72e0aff..afae3211f 100644
--- a/src/ARMeilleure/CodeGen/X86/CodeGenContext.cs
+++ b/src/ARMeilleure/CodeGen/X86/CodeGenContext.cs
@@ -2,6 +2,7 @@ using ARMeilleure.CodeGen.RegisterAllocators;
using ARMeilleure.IntermediateRepresentation;
using Microsoft.IO;
using Ryujinx.Common.Memory;
+using System.IO;
using System.Numerics;
namespace ARMeilleure.CodeGen.X86
diff --git a/src/ARMeilleure/CodeGen/X86/X86Register.cs b/src/ARMeilleure/CodeGen/X86/X86Register.cs
index d1394deaa..bcce4f974 100644
--- a/src/ARMeilleure/CodeGen/X86/X86Register.cs
+++ b/src/ARMeilleure/CodeGen/X86/X86Register.cs
@@ -1,3 +1,5 @@
+using System.Diagnostics.CodeAnalysis;
+
namespace ARMeilleure.CodeGen.X86
{
enum X86Register
diff --git a/src/ARMeilleure/Instructions/CryptoHelper.cs b/src/ARMeilleure/Instructions/CryptoHelper.cs
index 3ce04aa5c..046a9bb6d 100644
--- a/src/ARMeilleure/Instructions/CryptoHelper.cs
+++ b/src/ARMeilleure/Instructions/CryptoHelper.cs
@@ -8,8 +8,8 @@ namespace ARMeilleure.Instructions
static class CryptoHelper
{
#region "LookUp Tables"
-
- private static ReadOnlySpan SBox =>
+#pragma warning disable IDE1006 // Naming rule violation
+ private static ReadOnlySpan _sBox =>
[
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
@@ -29,7 +29,7 @@ namespace ARMeilleure.Instructions
0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
];
- private static ReadOnlySpan InvSBox =>
+ private static ReadOnlySpan _invSBox =>
[
0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,
0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb,
@@ -49,7 +49,7 @@ namespace ARMeilleure.Instructions
0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d
];
- private static ReadOnlySpan GfMul02 =>
+ private static ReadOnlySpan _gfMul02 =>
[
0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e,
@@ -69,7 +69,7 @@ namespace ARMeilleure.Instructions
0xfb, 0xf9, 0xff, 0xfd, 0xf3, 0xf1, 0xf7, 0xf5, 0xeb, 0xe9, 0xef, 0xed, 0xe3, 0xe1, 0xe7, 0xe5
];
- private static ReadOnlySpan GfMul03 =>
+ private static ReadOnlySpan _gfMul03 =>
[
0x00, 0x03, 0x06, 0x05, 0x0c, 0x0f, 0x0a, 0x09, 0x18, 0x1b, 0x1e, 0x1d, 0x14, 0x17, 0x12, 0x11,
0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f, 0x3a, 0x39, 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21,
@@ -89,7 +89,7 @@ namespace ARMeilleure.Instructions
0x0b, 0x08, 0x0d, 0x0e, 0x07, 0x04, 0x01, 0x02, 0x13, 0x10, 0x15, 0x16, 0x1f, 0x1c, 0x19, 0x1a
];
- private static ReadOnlySpan GfMul09 =>
+ private static ReadOnlySpan _gfMul09 =>
[
0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, 0x6c, 0x65, 0x7e, 0x77,
0x90, 0x99, 0x82, 0x8b, 0xb4, 0xbd, 0xa6, 0xaf, 0xd8, 0xd1, 0xca, 0xc3, 0xfc, 0xf5, 0xee, 0xe7,
@@ -109,7 +109,7 @@ namespace ARMeilleure.Instructions
0x31, 0x38, 0x23, 0x2a, 0x15, 0x1c, 0x07, 0x0e, 0x79, 0x70, 0x6b, 0x62, 0x5d, 0x54, 0x4f, 0x46
];
- private static ReadOnlySpan GfMul0B =>
+ private static ReadOnlySpan _gfMul0B =>
[
0x00, 0x0b, 0x16, 0x1d, 0x2c, 0x27, 0x3a, 0x31, 0x58, 0x53, 0x4e, 0x45, 0x74, 0x7f, 0x62, 0x69,
0xb0, 0xbb, 0xa6, 0xad, 0x9c, 0x97, 0x8a, 0x81, 0xe8, 0xe3, 0xfe, 0xf5, 0xc4, 0xcf, 0xd2, 0xd9,
@@ -129,7 +129,7 @@ namespace ARMeilleure.Instructions
0xca, 0xc1, 0xdc, 0xd7, 0xe6, 0xed, 0xf0, 0xfb, 0x92, 0x99, 0x84, 0x8f, 0xbe, 0xb5, 0xa8, 0xa3
];
- private static ReadOnlySpan GfMul0D =>
+ private static ReadOnlySpan _gfMul0D =>
[
0x00, 0x0d, 0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f, 0x5c, 0x51, 0x46, 0x4b,
0xd0, 0xdd, 0xca, 0xc7, 0xe4, 0xe9, 0xfe, 0xf3, 0xb8, 0xb5, 0xa2, 0xaf, 0x8c, 0x81, 0x96, 0x9b,
@@ -149,7 +149,7 @@ namespace ARMeilleure.Instructions
0xdc, 0xd1, 0xc6, 0xcb, 0xe8, 0xe5, 0xf2, 0xff, 0xb4, 0xb9, 0xae, 0xa3, 0x80, 0x8d, 0x9a, 0x97
];
- private static ReadOnlySpan GfMul0E =>
+ private static ReadOnlySpan _gfMul0E =>
[
0x00, 0x0e, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, 0x48, 0x46, 0x54, 0x5a,
0xe0, 0xee, 0xfc, 0xf2, 0xd8, 0xd6, 0xc4, 0xca, 0x90, 0x9e, 0x8c, 0x82, 0xa8, 0xa6, 0xb4, 0xba,
@@ -169,16 +169,16 @@ namespace ARMeilleure.Instructions
0xd7, 0xd9, 0xcb, 0xc5, 0xef, 0xe1, 0xf3, 0xfd, 0xa7, 0xa9, 0xbb, 0xb5, 0x9f, 0x91, 0x83, 0x8d
];
- private static ReadOnlySpan SrPerm =>
+ private static ReadOnlySpan _srPerm =>
[
0, 13, 10, 7, 4, 1, 14, 11, 8, 5, 2, 15, 12, 9, 6, 3
];
- private static ReadOnlySpan IsrPerm =>
+ private static ReadOnlySpan _isrPerm =>
[
0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11
];
-
+#pragma warning restore IDE1006
#endregion
public static V128 AesInvMixColumns(V128 op)
@@ -195,10 +195,10 @@ namespace ARMeilleure.Instructions
byte row2 = inState[idx + 2]; // C, G, K, O: [row2, col0-col3]
byte row3 = inState[idx + 3]; // D, H, L, P: [row3, col0-col3]
- outState[idx + 0] = (byte)((uint)GfMul0E[row0] ^ GfMul0B[row1] ^ GfMul0D[row2] ^ GfMul09[row3]);
- outState[idx + 1] = (byte)((uint)GfMul09[row0] ^ GfMul0E[row1] ^ GfMul0B[row2] ^ GfMul0D[row3]);
- outState[idx + 2] = (byte)((uint)GfMul0D[row0] ^ GfMul09[row1] ^ GfMul0E[row2] ^ GfMul0B[row3]);
- outState[idx + 3] = (byte)((uint)GfMul0B[row0] ^ GfMul0D[row1] ^ GfMul09[row2] ^ GfMul0E[row3]);
+ outState[idx + 0] = (byte)((uint)_gfMul0E[row0] ^ _gfMul0B[row1] ^ _gfMul0D[row2] ^ _gfMul09[row3]);
+ outState[idx + 1] = (byte)((uint)_gfMul09[row0] ^ _gfMul0E[row1] ^ _gfMul0B[row2] ^ _gfMul0D[row3]);
+ outState[idx + 2] = (byte)((uint)_gfMul0D[row0] ^ _gfMul09[row1] ^ _gfMul0E[row2] ^ _gfMul0B[row3]);
+ outState[idx + 3] = (byte)((uint)_gfMul0B[row0] ^ _gfMul0D[row1] ^ _gfMul09[row2] ^ _gfMul0E[row3]);
}
return new V128(outState);
@@ -211,7 +211,7 @@ namespace ARMeilleure.Instructions
for (int idx = 0; idx <= 15; idx++)
{
- outState[IsrPerm[idx]] = inState[idx];
+ outState[_isrPerm[idx]] = inState[idx];
}
return new V128(outState);
@@ -224,7 +224,7 @@ namespace ARMeilleure.Instructions
for (int idx = 0; idx <= 15; idx++)
{
- outState[idx] = InvSBox[inState[idx]];
+ outState[idx] = _invSBox[inState[idx]];
}
return new V128(outState);
@@ -244,10 +244,10 @@ namespace ARMeilleure.Instructions
byte row2 = inState[idx + 2]; // C, G, K, O: [row2, col0-col3]
byte row3 = inState[idx + 3]; // D, H, L, P: [row3, col0-col3]
- outState[idx + 0] = (byte)((uint)GfMul02[row0] ^ GfMul03[row1] ^ row2 ^ row3);
- outState[idx + 1] = (byte)((uint)row0 ^ GfMul02[row1] ^ GfMul03[row2] ^ row3);
- outState[idx + 2] = (byte)((uint)row0 ^ row1 ^ GfMul02[row2] ^ GfMul03[row3]);
- outState[idx + 3] = (byte)((uint)GfMul03[row0] ^ row1 ^ row2 ^ GfMul02[row3]);
+ outState[idx + 0] = (byte)((uint)_gfMul02[row0] ^ _gfMul03[row1] ^ row2 ^ row3);
+ outState[idx + 1] = (byte)((uint)row0 ^ _gfMul02[row1] ^ _gfMul03[row2] ^ row3);
+ outState[idx + 2] = (byte)((uint)row0 ^ row1 ^ _gfMul02[row2] ^ _gfMul03[row3]);
+ outState[idx + 3] = (byte)((uint)_gfMul03[row0] ^ row1 ^ row2 ^ _gfMul02[row3]);
}
return new V128(outState);
@@ -260,7 +260,7 @@ namespace ARMeilleure.Instructions
for (int idx = 0; idx <= 15; idx++)
{
- outState[SrPerm[idx]] = inState[idx];
+ outState[_srPerm[idx]] = inState[idx];
}
return new V128(outState);
@@ -273,7 +273,7 @@ namespace ARMeilleure.Instructions
for (int idx = 0; idx <= 15; idx++)
{
- outState[idx] = SBox[inState[idx]];
+ outState[idx] = _sBox[inState[idx]];
}
return new V128(outState);
diff --git a/src/ARMeilleure/Instructions/InstEmitMul.cs b/src/ARMeilleure/Instructions/InstEmitMul.cs
index bd2ac8d64..cb48deb03 100644
--- a/src/ARMeilleure/Instructions/InstEmitMul.cs
+++ b/src/ARMeilleure/Instructions/InstEmitMul.cs
@@ -2,6 +2,7 @@ using ARMeilleure.Decoders;
using ARMeilleure.IntermediateRepresentation;
using ARMeilleure.Translation;
using System;
+using System.Diagnostics.CodeAnalysis;
using static ARMeilleure.Instructions.InstEmitHelper;
namespace ARMeilleure.Instructions
diff --git a/src/ARMeilleure/Instructions/InstEmitSimdArithmetic.cs b/src/ARMeilleure/Instructions/InstEmitSimdArithmetic.cs
index 0fd188f2a..cee7a4ed8 100644
--- a/src/ARMeilleure/Instructions/InstEmitSimdArithmetic.cs
+++ b/src/ARMeilleure/Instructions/InstEmitSimdArithmetic.cs
@@ -11,10 +11,11 @@ using static ARMeilleure.Instructions.InstEmitHelper;
using static ARMeilleure.Instructions.InstEmitSimdHelper;
using static ARMeilleure.Instructions.InstEmitSimdHelper32;
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
-using Func2I = System.Func;
namespace ARMeilleure.Instructions
{
+ using Func2I = Func;
+
static partial class InstEmit
{
public static void Abs_S(ArmEmitterContext context)
diff --git a/src/ARMeilleure/Instructions/InstEmitSimdCmp.cs b/src/ARMeilleure/Instructions/InstEmitSimdCmp.cs
index 64e4078c8..8fcb06286 100644
--- a/src/ARMeilleure/Instructions/InstEmitSimdCmp.cs
+++ b/src/ARMeilleure/Instructions/InstEmitSimdCmp.cs
@@ -2,13 +2,15 @@ using ARMeilleure.Decoders;
using ARMeilleure.IntermediateRepresentation;
using ARMeilleure.State;
using ARMeilleure.Translation;
+using System;
using static ARMeilleure.Instructions.InstEmitHelper;
using static ARMeilleure.Instructions.InstEmitSimdHelper;
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
-using Func2I = System.Func;
namespace ARMeilleure.Instructions
{
+ using Func2I = Func;
+
static partial class InstEmit
{
public static void Cmeq_S(ArmEmitterContext context)
diff --git a/src/ARMeilleure/Instructions/InstEmitSimdCmp32.cs b/src/ARMeilleure/Instructions/InstEmitSimdCmp32.cs
index 3068519f3..6ec2b58f9 100644
--- a/src/ARMeilleure/Instructions/InstEmitSimdCmp32.cs
+++ b/src/ARMeilleure/Instructions/InstEmitSimdCmp32.cs
@@ -2,15 +2,17 @@ using ARMeilleure.Decoders;
using ARMeilleure.IntermediateRepresentation;
using ARMeilleure.State;
using ARMeilleure.Translation;
+using System;
using static ARMeilleure.Instructions.InstEmitHelper;
using static ARMeilleure.Instructions.InstEmitSimdHelper;
using static ARMeilleure.Instructions.InstEmitSimdHelper32;
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
-using Func2I = System.Func;
namespace ARMeilleure.Instructions
{
+ using Func2I = Func;
+
static partial class InstEmit32
{
public static void Vceq_V(ArmEmitterContext context)
diff --git a/src/ARMeilleure/Instructions/InstEmitSimdCvt.cs b/src/ARMeilleure/Instructions/InstEmitSimdCvt.cs
index a9787224e..cf427eeae 100644
--- a/src/ARMeilleure/Instructions/InstEmitSimdCvt.cs
+++ b/src/ARMeilleure/Instructions/InstEmitSimdCvt.cs
@@ -8,10 +8,11 @@ using System.Reflection;
using static ARMeilleure.Instructions.InstEmitHelper;
using static ARMeilleure.Instructions.InstEmitSimdHelper;
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
-using Func1I = System.Func;
namespace ARMeilleure.Instructions
{
+ using Func1I = Func;
+
static partial class InstEmit
{
public static void Fcvt_S(ArmEmitterContext context)
diff --git a/src/ARMeilleure/Instructions/InstEmitSimdHelper.cs b/src/ARMeilleure/Instructions/InstEmitSimdHelper.cs
index e44e174fe..11d0c93b4 100644
--- a/src/ARMeilleure/Instructions/InstEmitSimdHelper.cs
+++ b/src/ARMeilleure/Instructions/InstEmitSimdHelper.cs
@@ -8,12 +8,13 @@ using System.Diagnostics;
using System.Reflection;
using static ARMeilleure.Instructions.InstEmitHelper;
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
-using Func1I = System.Func;
-using Func2I = System.Func;
-using Func3I = System.Func;
namespace ARMeilleure.Instructions
{
+ using Func1I = Func;
+ using Func2I = Func;
+ using Func3I = Func;
+
static class InstEmitSimdHelper
{
#region "Masks"
diff --git a/src/ARMeilleure/Instructions/InstEmitSimdHelper32.cs b/src/ARMeilleure/Instructions/InstEmitSimdHelper32.cs
index 7b9b0c1b7..c053fe27b 100644
--- a/src/ARMeilleure/Instructions/InstEmitSimdHelper32.cs
+++ b/src/ARMeilleure/Instructions/InstEmitSimdHelper32.cs
@@ -7,12 +7,13 @@ using System.Reflection;
using static ARMeilleure.Instructions.InstEmitHelper;
using static ARMeilleure.Instructions.InstEmitSimdHelper;
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
-using Func1I = System.Func;
-using Func2I = System.Func;
-using Func3I = System.Func;
namespace ARMeilleure.Instructions
{
+ using Func1I = Func;
+ using Func2I = Func;
+ using Func3I = Func;
+
static class InstEmitSimdHelper32
{
public static (int, int) GetQuadwordAndSubindex(int index, RegisterSize size)
diff --git a/src/ARMeilleure/Instructions/InstEmitSimdHelper32Arm64.cs b/src/ARMeilleure/Instructions/InstEmitSimdHelper32Arm64.cs
index bfd3064a0..a1ca417b4 100644
--- a/src/ARMeilleure/Instructions/InstEmitSimdHelper32Arm64.cs
+++ b/src/ARMeilleure/Instructions/InstEmitSimdHelper32Arm64.cs
@@ -7,12 +7,13 @@ using System.Diagnostics;
using static ARMeilleure.Instructions.InstEmitHelper;
using static ARMeilleure.Instructions.InstEmitSimdHelper;
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
-using Func1I = System.Func;
-using Func2I = System.Func;
-using Func3I = System.Func;
namespace ARMeilleure.Instructions
{
+ using Func1I = Func;
+ using Func2I = Func;
+ using Func3I = Func;
+
static class InstEmitSimdHelper32Arm64
{
// Intrinsic Helpers
diff --git a/src/ARMeilleure/Instructions/InstEmitSimdMemory.cs b/src/ARMeilleure/Instructions/InstEmitSimdMemory.cs
index 5409e6879..dedf0fa05 100644
--- a/src/ARMeilleure/Instructions/InstEmitSimdMemory.cs
+++ b/src/ARMeilleure/Instructions/InstEmitSimdMemory.cs
@@ -40,36 +40,34 @@ namespace ARMeilleure.Instructions
long offset = 0;
- for (int rep = 0; rep < op.Reps; rep++)
+#pragma warning disable IDE0055 // Disable formatting
+ for (int rep = 0; rep < op.Reps; rep++)
+ for (int elem = 0; elem < op.Elems; elem++)
+ for (int sElem = 0; sElem < op.SElems; sElem++)
{
- for (int elem = 0; elem < op.Elems; elem++)
+ int rtt = (op.Rt + rep + sElem) & 0x1f;
+
+ Operand tt = GetVec(rtt);
+
+ Operand address = context.Add(n, Const(offset));
+
+ if (isLoad)
{
- for (int sElem = 0; sElem < op.SElems; sElem++)
+ EmitLoadSimd(context, address, tt, rtt, elem, op.Size);
+
+ if (op.RegisterSize == RegisterSize.Simd64 && elem == op.Elems - 1)
{
- int rtt = (op.Rt + rep + sElem) & 0x1f;
-
- Operand tt = GetVec(rtt);
-
- Operand address = context.Add(n, Const(offset));
-
- if (isLoad)
- {
- EmitLoadSimd(context, address, tt, rtt, elem, op.Size);
-
- if (op.RegisterSize == RegisterSize.Simd64 && elem == op.Elems - 1)
- {
- context.Copy(tt, context.VectorZeroUpper64(tt));
- }
- }
- else
- {
- EmitStoreSimd(context, address, rtt, elem, op.Size);
- }
-
- offset += 1 << op.Size;
+ context.Copy(tt, context.VectorZeroUpper64(tt));
}
}
+ else
+ {
+ EmitStoreSimd(context, address, rtt, elem, op.Size);
+ }
+
+ offset += 1 << op.Size;
}
+#pragma warning restore IDE0055
if (op.WBack)
{
diff --git a/src/ARMeilleure/Instructions/InstEmitSimdShift.cs b/src/ARMeilleure/Instructions/InstEmitSimdShift.cs
index 39dadf13d..3469434c0 100644
--- a/src/ARMeilleure/Instructions/InstEmitSimdShift.cs
+++ b/src/ARMeilleure/Instructions/InstEmitSimdShift.cs
@@ -9,10 +9,11 @@ using System.Reflection;
using static ARMeilleure.Instructions.InstEmitHelper;
using static ARMeilleure.Instructions.InstEmitSimdHelper;
using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
-using Func2I = System.Func;
namespace ARMeilleure.Instructions
{
+ using Func2I = Func;
+
static partial class InstEmit
{
#region "Masks"
diff --git a/src/ARMeilleure/IntermediateRepresentation/Intrinsic.cs b/src/ARMeilleure/IntermediateRepresentation/Intrinsic.cs
index 31dc97bd6..9d87c13b3 100644
--- a/src/ARMeilleure/IntermediateRepresentation/Intrinsic.cs
+++ b/src/ARMeilleure/IntermediateRepresentation/Intrinsic.cs
@@ -1,4 +1,5 @@
using System;
+using System.Diagnostics.CodeAnalysis;
namespace ARMeilleure.IntermediateRepresentation
{
diff --git a/src/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs b/src/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
index 69c56a98c..d22c89a75 100644
--- a/src/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
+++ b/src/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
@@ -7,9 +7,10 @@ namespace ARMeilleure.IntermediateRepresentation
{
private struct Data
{
+#pragma warning disable CS0649 // Field is never assigned to
public byte Kind;
public byte Type;
-
+#pragma warning restore CS0649
public byte Scale;
public Operand BaseAddress;
public Operand Index;
diff --git a/src/ARMeilleure/Optimizations.cs b/src/ARMeilleure/Optimizations.cs
index 297ee040c..18390de31 100644
--- a/src/ARMeilleure/Optimizations.cs
+++ b/src/ARMeilleure/Optimizations.cs
@@ -1,8 +1,8 @@
-using Arm64HardwareCapabilities = ARMeilleure.CodeGen.Arm64.HardwareCapabilities;
-using X86HardwareCapabilities = ARMeilleure.CodeGen.X86.HardwareCapabilities;
-
namespace ARMeilleure
{
+ using Arm64HardwareCapabilities = ARMeilleure.CodeGen.Arm64.HardwareCapabilities;
+ using X86HardwareCapabilities = ARMeilleure.CodeGen.X86.HardwareCapabilities;
+
public static class Optimizations
{
// low-core count PPTC
diff --git a/src/ARMeilleure/Translation/ArmEmitterContext.cs b/src/ARMeilleure/Translation/ArmEmitterContext.cs
index 0d6e65d8b..196120e92 100644
--- a/src/ARMeilleure/Translation/ArmEmitterContext.cs
+++ b/src/ARMeilleure/Translation/ArmEmitterContext.cs
@@ -218,28 +218,18 @@ namespace ARMeilleure.Translation
{
switch (condition)
{
-
- case Condition.Eq:
- return ICompareEqual(n, m);
- case Condition.Ne:
- return ICompareNotEqual(n, m);
- case Condition.GeUn:
- return ICompareGreaterOrEqualUI(n, m);
- case Condition.LtUn:
- return ICompareLessUI(n, m);
- case Condition.GtUn:
- return ICompareGreaterUI(n, m);
- case Condition.LeUn:
- return ICompareLessOrEqualUI(n, m);
- case Condition.Ge:
- return ICompareGreaterOrEqual(n, m);
- case Condition.Lt:
- return ICompareLess(n, m);
- case Condition.Gt:
- return ICompareGreater(n, m);
- case Condition.Le:
- return ICompareLessOrEqual(n, m);
-
+#pragma warning disable IDE0055 // Disable formatting
+ case Condition.Eq: return ICompareEqual (n, m);
+ case Condition.Ne: return ICompareNotEqual (n, m);
+ case Condition.GeUn: return ICompareGreaterOrEqualUI(n, m);
+ case Condition.LtUn: return ICompareLessUI (n, m);
+ case Condition.GtUn: return ICompareGreaterUI (n, m);
+ case Condition.LeUn: return ICompareLessOrEqualUI (n, m);
+ case Condition.Ge: return ICompareGreaterOrEqual (n, m);
+ case Condition.Lt: return ICompareLess (n, m);
+ case Condition.Gt: return ICompareGreater (n, m);
+ case Condition.Le: return ICompareLessOrEqual (n, m);
+#pragma warning restore IDE0055
}
}
else if (cmpName == InstName.Adds && _optOpLastCompare is IOpCodeAluImm op)
@@ -264,20 +254,14 @@ namespace ARMeilleure.Translation
switch (condition)
{
-
- case Condition.Eq:
- return ICompareEqual(n, m);
- case Condition.Ne:
- return ICompareNotEqual(n, m);
- case Condition.Ge:
- return ICompareGreaterOrEqual(n, m);
- case Condition.Lt:
- return ICompareLess(n, m);
- case Condition.Gt:
- return ICompareGreater(n, m);
- case Condition.Le:
- return ICompareLessOrEqual(n, m);
-
+#pragma warning disable IDE0055 // Disable formatting
+ case Condition.Eq: return ICompareEqual (n, m);
+ case Condition.Ne: return ICompareNotEqual (n, m);
+ case Condition.Ge: return ICompareGreaterOrEqual(n, m);
+ case Condition.Lt: return ICompareLess (n, m);
+ case Condition.Gt: return ICompareGreater (n, m);
+ case Condition.Le: return ICompareLessOrEqual (n, m);
+#pragma warning restore IDE0055
}
}
diff --git a/src/ARMeilleure/Translation/PTC/Ptc.cs b/src/ARMeilleure/Translation/PTC/Ptc.cs
index a9f077dd9..f36d4256d 100644
--- a/src/ARMeilleure/Translation/PTC/Ptc.cs
+++ b/src/ARMeilleure/Translation/PTC/Ptc.cs
@@ -22,11 +22,12 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
using static ARMeilleure.Translation.PTC.PtcFormatter;
-using Arm64HardwareCapabilities = ARMeilleure.CodeGen.Arm64.HardwareCapabilities;
-using X86HardwareCapabilities = ARMeilleure.CodeGen.X86.HardwareCapabilities;
namespace ARMeilleure.Translation.PTC
{
+ using Arm64HardwareCapabilities = CodeGen.Arm64.HardwareCapabilities;
+ using X86HardwareCapabilities = CodeGen.X86.HardwareCapabilities;
+
class Ptc : IPtcLoadState
{
private const string OuterHeaderMagicString = "PTCohd\0\0";
diff --git a/src/ARMeilleure/Translation/RegisterUsage.cs b/src/ARMeilleure/Translation/RegisterUsage.cs
index e2489b6a9..03d4a96e7 100644
--- a/src/ARMeilleure/Translation/RegisterUsage.cs
+++ b/src/ARMeilleure/Translation/RegisterUsage.cs
@@ -297,20 +297,12 @@ namespace ARMeilleure.Translation
switch (register.Type)
{
-
- case RegisterType.Flag:
- intMask = (1L << RegsCount) << register.Index;
- break;
- case RegisterType.Integer:
- intMask = 1L << register.Index;
- break;
- case RegisterType.FpFlag:
- vecMask = (1L << RegsCount) << register.Index;
- break;
- case RegisterType.Vector:
- vecMask = 1L << register.Index;
- break;
-
+#pragma warning disable IDE0055 // Disable formatting
+ case RegisterType.Flag: intMask = (1L << RegsCount) << register.Index; break;
+ case RegisterType.Integer: intMask = 1L << register.Index; break;
+ case RegisterType.FpFlag: vecMask = (1L << RegsCount) << register.Index; break;
+ case RegisterType.Vector: vecMask = 1L << register.Index; break;
+#pragma warning restore IDE0055
}
return new RegisterMask(intMask, vecMask);
diff --git a/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs b/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs
index f7e1d27b8..d5381209e 100644
--- a/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs
+++ b/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs
@@ -12,7 +12,7 @@ using static SDL2.SDL;
namespace Ryujinx.Audio.Backends.SDL2
{
- public partial class SDL2HardwareDeviceDriver : IHardwareDeviceDriver
+ public class SDL2HardwareDeviceDriver : IHardwareDeviceDriver
{
private readonly ManualResetEvent _updateRequiredEvent;
private readonly ManualResetEvent _pauseEvent;
@@ -22,36 +22,10 @@ namespace Ryujinx.Audio.Backends.SDL2
public float Volume { get; set; }
- // A safe method to get default audio information.
- private static int GetDefaultAudioInfo(nint name, out SDL_AudioSpec spec, int isCapture)
- {
- int result;
- spec = new SDL_AudioSpec();
- IntPtr specPtr = IntPtr.Zero;
-
- try
- {
- // Reserve memory
- specPtr = Marshal.AllocHGlobal(Marshal.SizeOf());
- // Call method
- result = SDL_GetDefaultAudioInfo(name, specPtr, isCapture);
- // Copy result to managed structure
- spec = Marshal.PtrToStructure(specPtr);
- }
- finally
- {
- // Free the unmanaged memory to prevent memory leaks
- if (specPtr != IntPtr.Zero)
- {
- Marshal.FreeHGlobal(specPtr);
- }
- }
-
- return result;
- }
-
- [LibraryImport("SDL2")]
- private static partial int SDL_GetDefaultAudioInfo(nint name, nint spec, int isCapture);
+ // TODO: Add this to SDL2-CS
+ // NOTE: We use a DllImport here because of marshaling issue for spec.
+ [DllImport("SDL2")]
+ private static extern int SDL_GetDefaultAudioInfo(nint name, out SDL_AudioSpec spec, int isCapture);
public SDL2HardwareDeviceDriver()
{
@@ -61,7 +35,7 @@ namespace Ryujinx.Audio.Backends.SDL2
SDL2Driver.Instance.Initialize();
- int res = GetDefaultAudioInfo(nint.Zero, out SDL_AudioSpec spec, 0);
+ int res = SDL_GetDefaultAudioInfo(nint.Zero, out SDL_AudioSpec spec, 0);
if (res != 0)
{
diff --git a/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIo.cs b/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIo.cs
index 62f6b14bc..6a12e8c0c 100644
--- a/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIo.cs
+++ b/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIo.cs
@@ -23,7 +23,7 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void JackCallbackDelegate(nint msg);
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
+ [StructLayout(LayoutKind.Sequential)]
public struct SoundIoStruct
{
public nint UserData;
diff --git a/src/Ryujinx.Audio/Renderer/Common/UpdateDataHeader.cs b/src/Ryujinx.Audio/Renderer/Common/UpdateDataHeader.cs
index b756f9d70..98b224ebf 100644
--- a/src/Ryujinx.Audio/Renderer/Common/UpdateDataHeader.cs
+++ b/src/Ryujinx.Audio/Renderer/Common/UpdateDataHeader.cs
@@ -20,7 +20,9 @@ namespace Ryujinx.Audio.Renderer.Common
public uint Unknown24;
public uint RenderInfoSize;
+#pragma warning disable IDE0051, CS0169 // Remove unused field
private Array4 _reserved;
+#pragma warning restore IDE0051, CS0169
public uint TotalSize;
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/AdpcmHelper.cs b/src/Ryujinx.Audio/Renderer/Dsp/AdpcmHelper.cs
index 38429092f..1a5802a37 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/AdpcmHelper.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/AdpcmHelper.cs
@@ -12,8 +12,9 @@ namespace Ryujinx.Audio.Renderer.Dsp
private const int SamplesPerFrame = 14;
private const int NibblesPerFrame = SamplesPerFrame + 2;
private const int BytesPerFrame = 8;
-
+#pragma warning disable IDE0051 // Remove unused private member
private const int BitsPerFrame = BytesPerFrame * 8;
+#pragma warning restore IDE0051
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint GetAdpcmDataSize(int sampleCount)
diff --git a/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs b/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs
index c6f126c65..ee2f23479 100644
--- a/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs
+++ b/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs
@@ -41,10 +41,10 @@ namespace Ryujinx.Audio.Renderer.Server
private UpsamplerManager _upsamplerManager;
private bool _isActive;
private BehaviourContext _behaviourContext;
-
+#pragma warning disable IDE0052 // Remove unread private member
private ulong _totalElapsedTicksUpdating;
private ulong _totalElapsedTicks;
-
+#pragma warning restore IDE0052
private int _sessionId;
private Memory _memoryPools;
diff --git a/src/Ryujinx.Common/Collections/TreeDictionary.cs b/src/Ryujinx.Common/Collections/TreeDictionary.cs
index f194a9f93..af104d268 100644
--- a/src/Ryujinx.Common/Collections/TreeDictionary.cs
+++ b/src/Ryujinx.Common/Collections/TreeDictionary.cs
@@ -147,9 +147,9 @@ namespace Ryujinx.Common.Collections
Queue> nodes = new();
- if (Root != null)
+ if (this.Root != null)
{
- nodes.Enqueue(Root);
+ nodes.Enqueue(this.Root);
}
while (nodes.TryDequeue(out Node node))
@@ -522,7 +522,7 @@ namespace Ryujinx.Common.Collections
public void CopyTo(KeyValuePair[] array, int arrayIndex)
{
- if (arrayIndex < 0 || array.Length - arrayIndex < Count)
+ if (arrayIndex < 0 || array.Length - arrayIndex < this.Count)
{
throw new ArgumentOutOfRangeException(nameof(arrayIndex));
}
diff --git a/src/Ryujinx.Common/Configuration/AspectRatioExtensions.cs b/src/Ryujinx.Common/Configuration/AspectRatioExtensions.cs
index bae6e35de..f3a9e1646 100644
--- a/src/Ryujinx.Common/Configuration/AspectRatioExtensions.cs
+++ b/src/Ryujinx.Common/Configuration/AspectRatioExtensions.cs
@@ -36,6 +36,8 @@ namespace Ryujinx.Common.Configuration
};
}
+
+
public static float ToFloatY(this AspectRatio aspectRatio)
{
return aspectRatio switch
diff --git a/src/Ryujinx.Common/Configuration/DirtyHack.cs b/src/Ryujinx.Common/Configuration/DirtyHack.cs
index d0565c88a..ae3416a27 100644
--- a/src/Ryujinx.Common/Configuration/DirtyHack.cs
+++ b/src/Ryujinx.Common/Configuration/DirtyHack.cs
@@ -18,6 +18,8 @@ namespace Ryujinx.Common.Configuration
public DirtyHack Hack => hack;
public int Value => value;
+
+
public ulong Pack() => Raw.PackBitFields(PackedFormat);
public static EnabledDirtyHack Unpack(ulong packedHack)
diff --git a/src/Ryujinx.Common/Hash128.cs b/src/Ryujinx.Common/Hash128.cs
index f57bb6c84..e95a15caa 100644
--- a/src/Ryujinx.Common/Hash128.cs
+++ b/src/Ryujinx.Common/Hash128.cs
@@ -10,7 +10,7 @@ using System.Runtime.Intrinsics.X86;
namespace Ryujinx.Common
{
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
+ [StructLayout(LayoutKind.Sequential)]
public struct Hash128(ulong low, ulong high) : IEquatable
{
public ulong Low = low;
diff --git a/src/Ryujinx.Common/Logging/Logger.cs b/src/Ryujinx.Common/Logging/Logger.cs
index add5ad22f..e6f68599a 100644
--- a/src/Ryujinx.Common/Logging/Logger.cs
+++ b/src/Ryujinx.Common/Logging/Logger.cs
@@ -219,34 +219,16 @@ namespace Ryujinx.Common.Logging
switch (logLevel)
{
#pragma warning disable IDE0055 // Disable formatting
- case LogLevel.Debug:
- Debug = enabled ? new Log(LogLevel.Debug) : new Log?();
- break;
- case LogLevel.Info:
- Info = enabled ? new Log(LogLevel.Info) : new Log?();
- break;
- case LogLevel.Warning:
- Warning = enabled ? new Log(LogLevel.Warning) : new Log?();
- break;
- case LogLevel.Error:
- Error = enabled ? new Log(LogLevel.Error) : new Log?();
- break;
- case LogLevel.Guest:
- Guest = enabled ? new Log(LogLevel.Guest) : new Log?();
- break;
- case LogLevel.AccessLog:
- AccessLog = enabled ? new Log(LogLevel.AccessLog) : new Log?();
- break;
- case LogLevel.Stub:
- Stub = enabled ? new Log(LogLevel.Stub) : new Log?();
- break;
- case LogLevel.Trace:
- Trace = enabled ? new Log(LogLevel.Trace) : new Log?();
- break;
- case LogLevel.Notice:
- break;
- default:
- throw new ArgumentException("Unknown Log Level", nameof(logLevel));
+ case LogLevel.Debug : Debug = enabled ? new Log(LogLevel.Debug) : new Log?(); break;
+ case LogLevel.Info : Info = enabled ? new Log(LogLevel.Info) : new Log?(); break;
+ case LogLevel.Warning : Warning = enabled ? new Log(LogLevel.Warning) : new Log?(); break;
+ case LogLevel.Error : Error = enabled ? new Log(LogLevel.Error) : new Log?(); break;
+ case LogLevel.Guest : Guest = enabled ? new Log(LogLevel.Guest) : new Log?(); break;
+ case LogLevel.AccessLog : AccessLog = enabled ? new Log(LogLevel.AccessLog) : new Log?(); break;
+ case LogLevel.Stub : Stub = enabled ? new Log(LogLevel.Stub) : new Log?(); break;
+ case LogLevel.Trace : Trace = enabled ? new Log(LogLevel.Trace) : new Log?(); break;
+ case LogLevel.Notice : break;
+ default: throw new ArgumentException("Unknown Log Level", nameof(logLevel));
#pragma warning restore IDE0055
}
}
diff --git a/src/Ryujinx.Common/Memory/StructArrayHelpers.cs b/src/Ryujinx.Common/Memory/StructArrayHelpers.cs
index 6d3435755..fcb2229a7 100644
--- a/src/Ryujinx.Common/Memory/StructArrayHelpers.cs
+++ b/src/Ryujinx.Common/Memory/StructArrayHelpers.cs
@@ -2,9 +2,9 @@ using System;
using System.Diagnostics.Contracts;
using System.Runtime.InteropServices;
+#pragma warning disable CS0169, IDE0051 // Remove unused private member
namespace Ryujinx.Common.Memory
{
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array1 : IArray where T : unmanaged
{
T _e0;
@@ -15,7 +15,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array2 : IArray where T : unmanaged
{
T _e0;
@@ -27,7 +26,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array3 : IArray where T : unmanaged
{
T _e0;
@@ -39,7 +37,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array4 : IArray where T : unmanaged
{
T _e0;
@@ -51,7 +48,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array5 : IArray where T : unmanaged
{
T _e0;
@@ -63,7 +59,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array6 : IArray where T : unmanaged
{
T _e0;
@@ -75,7 +70,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array7 : IArray where T : unmanaged
{
T _e0;
@@ -87,7 +81,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array8 : IArray where T : unmanaged
{
T _e0;
@@ -99,7 +92,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array9 : IArray where T : unmanaged
{
T _e0;
@@ -111,7 +103,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array10 : IArray where T : unmanaged
{
T _e0;
@@ -123,7 +114,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array11 : IArray where T : unmanaged
{
T _e0;
@@ -135,7 +125,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array12 : IArray where T : unmanaged
{
T _e0;
@@ -147,7 +136,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array13 : IArray where T : unmanaged
{
T _e0;
@@ -159,7 +147,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array14 : IArray where T : unmanaged
{
T _e0;
@@ -171,7 +158,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array15 : IArray where T : unmanaged
{
T _e0;
@@ -183,7 +169,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array16 : IArray where T : unmanaged
{
T _e0;
@@ -195,7 +180,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array17 : IArray where T : unmanaged
{
T _e0;
@@ -207,7 +191,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array18 : IArray where T : unmanaged
{
T _e0;
@@ -219,7 +202,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array19 : IArray where T : unmanaged
{
T _e0;
@@ -231,7 +213,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array20 : IArray where T : unmanaged
{
T _e0;
@@ -243,7 +224,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array21 : IArray where T : unmanaged
{
T _e0;
@@ -255,7 +235,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array22 : IArray where T : unmanaged
{
T _e0;
@@ -267,7 +246,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array23 : IArray where T : unmanaged
{
T _e0;
@@ -279,7 +257,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array24 : IArray where T : unmanaged
{
T _e0;
@@ -292,7 +269,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array25 : IArray where T : unmanaged
{
T _e0;
@@ -305,7 +281,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array26 : IArray where T : unmanaged
{
T _e0;
@@ -318,7 +293,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array27 : IArray where T : unmanaged
{
T _e0;
@@ -331,7 +305,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array28 : IArray where T : unmanaged
{
T _e0;
@@ -344,7 +317,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array29 : IArray where T : unmanaged
{
T _e0;
@@ -357,7 +329,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array30 : IArray where T : unmanaged
{
T _e0;
@@ -370,7 +341,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array31 : IArray where T : unmanaged
{
T _e0;
@@ -383,7 +353,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array32 : IArray where T : unmanaged
{
T _e0;
@@ -396,7 +365,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array33 : IArray where T : unmanaged
{
T _e0;
@@ -409,7 +377,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array34 : IArray where T : unmanaged
{
T _e0;
@@ -422,7 +389,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array35 : IArray where T : unmanaged
{
T _e0;
@@ -435,7 +401,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array36 : IArray where T : unmanaged
{
T _e0;
@@ -448,7 +413,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array37 : IArray where T : unmanaged
{
T _e0;
@@ -461,7 +425,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array38 : IArray where T : unmanaged
{
T _e0;
@@ -474,7 +437,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array39 : IArray where T : unmanaged
{
T _e0;
@@ -487,7 +449,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array40 : IArray where T : unmanaged
{
T _e0;
@@ -500,7 +461,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array41 : IArray where T : unmanaged
{
T _e0;
@@ -513,7 +473,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array42 : IArray where T : unmanaged
{
T _e0;
@@ -526,7 +485,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array43 : IArray where T : unmanaged
{
T _e0;
@@ -539,7 +497,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array44 : IArray where T : unmanaged
{
T _e0;
@@ -552,7 +509,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array45 : IArray where T : unmanaged
{
T _e0;
@@ -565,7 +521,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array46 : IArray where T : unmanaged
{
T _e0;
@@ -578,7 +533,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array47 : IArray where T : unmanaged
{
T _e0;
@@ -591,7 +545,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array48 : IArray where T : unmanaged
{
T _e0;
@@ -604,7 +557,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array49 : IArray where T : unmanaged
{
T _e0;
@@ -617,7 +569,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array50 : IArray where T : unmanaged
{
T _e0;
@@ -630,7 +581,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array51 : IArray where T : unmanaged
{
T _e0;
@@ -643,7 +593,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array52 : IArray where T : unmanaged
{
T _e0;
@@ -656,7 +605,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array53 : IArray where T : unmanaged
{
T _e0;
@@ -669,7 +617,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array54 : IArray where T : unmanaged
{
T _e0;
@@ -682,7 +629,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array55 : IArray where T : unmanaged
{
T _e0;
@@ -695,7 +641,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array56 : IArray where T : unmanaged
{
T _e0;
@@ -708,7 +653,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array57 : IArray where T : unmanaged
{
T _e0;
@@ -721,7 +665,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array58 : IArray where T : unmanaged
{
T _e0;
@@ -734,7 +677,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array59 : IArray where T : unmanaged
{
T _e0;
@@ -747,7 +689,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array60 : IArray where T : unmanaged
{
T _e0;
@@ -759,7 +700,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array61 : IArray where T : unmanaged
{
T _e0;
@@ -771,7 +711,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array62 : IArray where T : unmanaged
{
T _e0;
@@ -783,7 +722,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array63 : IArray where T : unmanaged
{
T _e0;
@@ -795,7 +733,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array64 : IArray where T : unmanaged
{
T _e0;
@@ -807,7 +744,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array65 : IArray where T : unmanaged
{
T _e0;
@@ -819,7 +755,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array73 : IArray where T : unmanaged
{
T _e0;
@@ -832,7 +767,6 @@ namespace Ryujinx.Common.Memory
public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Array96