mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-19 18:59:22 +00:00
Compare commits
6 Commits
Canary-1.3
...
Canary-1.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
963f024838 | ||
|
|
c263c211bd | ||
|
|
77c9a50f59 | ||
|
|
a9ce288632 | ||
|
|
9b88fee78f | ||
|
|
04574103cf |
@@ -3,12 +3,12 @@
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia" Version="11.3.15" />
|
||||
<PackageVersion Include="Avalonia" Version="11.3.17" />
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.13" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.15" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.15" />
|
||||
<PackageVersion Include="Avalonia.Markup.Xaml.Loader" Version="11.3.15" />
|
||||
<PackageVersion Include="SharpCompress" Version="0.48.1" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.17" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.17" />
|
||||
<PackageVersion Include="Avalonia.Markup.Xaml.Loader" Version="11.3.17" />
|
||||
<PackageVersion Include="SharpCompress" Version="0.49.1" />
|
||||
<PackageVersion Include="Svg.Controls.Avalonia" Version="11.3.9.5" />
|
||||
<PackageVersion Include="Svg.Controls.Skia.Avalonia" Version="11.3.9.5" />
|
||||
<PackageVersion Include="Microsoft.Build.Framework" Version="17.11.4" />
|
||||
@@ -52,8 +52,8 @@
|
||||
<PackageVersion Include="Gommon" Version="2.8.1.2" />
|
||||
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
|
||||
<PackageVersion Include="Sep" Version="0.14.1" />
|
||||
<PackageVersion Include="shaderc.net" Version="0.1.0" />
|
||||
<PackageVersion Include="SharpZipLib" Version="1.4.2" />
|
||||
<PackageVersion Include="Silk.NET.Shaderc" Version="2.23.0" />
|
||||
<PackageVersion Include="Silk.NET.Vulkan" Version="2.23.0" />
|
||||
<PackageVersion Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.23.0" />
|
||||
<PackageVersion Include="Silk.NET.Vulkan.Extensions.KHR" Version="2.23.0" />
|
||||
|
||||
10
README.md
10
README.md
@@ -40,8 +40,14 @@
|
||||
|
||||
## Usage
|
||||
|
||||
To run this emulator, your PC must be equipped with at least 8GiB of RAM;
|
||||
failing to meet this requirement may result in a poor gameplay experience or unexpected crashes.
|
||||
To run this emulator, your PC must be equipped with at least:
|
||||
- 8GiB of RAM
|
||||
- 6 cores
|
||||
- A GPU released within the last 10 years.
|
||||
- OpenGL 4.6 | Vulkan 1.4
|
||||
- Windows 10 version 20H1 | macOS Big Sur (Apple Silicon)
|
||||
|
||||
Failing to meet these requirements may result in a poor gameplay experience or unexpected crashes.
|
||||
|
||||
## Latest build
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"Locales": [
|
||||
{
|
||||
"ID": "SettingsTabInputDirectMouseAccess",
|
||||
@@ -171,7 +171,7 @@
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_CN": "使用低延迟垃圾回收器",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
@@ -6446,7 +6446,7 @@
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_CN": "将按键绑定重置为默认",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
@@ -9846,7 +9846,7 @@
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_CN": "开启 HD 震动",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
@@ -9871,7 +9871,7 @@
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_CN": "向控制器发送更多数据以获得更好的震动效果。\n\n目前仅支持任天堂官方的 Switch 控制器。\n\n如果你在使用 JoyCon 或 Pro 手柄,请保持开启状态。",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
@@ -11696,7 +11696,7 @@
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_CN": "要将选定设备的按键绑定重置为默认值吗?",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
@@ -11721,7 +11721,7 @@
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_CN": "这是一个破坏性的操作,会覆盖此设备当前的绑定。",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
@@ -13696,7 +13696,7 @@
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_CN": "将 CLR 的垃圾回收器设置为低延迟模式。\n\n这可能会减少卡顿,但会以性能为代价。\n\n不确定的话就保持关闭。",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -147,6 +147,7 @@ namespace Ryujinx.Common
|
||||
"0100c1f0051b6000", // Donkey Kong Country: Tropical Freeze
|
||||
"0100ed000d390000", // Dr. Kawashima's Brain Training
|
||||
"010067b017588000", // Endless Ocean Luminous
|
||||
"01003da010e8a000", // Miitopia
|
||||
"01006b5012b32000", // Part Time UFO
|
||||
"0100704000B3A000", // Snipperclips
|
||||
"01006a800016e000", // Super Smash Bros. Ultimate
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OpenTK.Windowing.GraphicsLibraryFramework" />
|
||||
<PackageReference Include="shaderc.net" />
|
||||
<PackageReference Include="Silk.NET.Shaderc" ExcludeAssets="native" />
|
||||
<PackageReference Include="Silk.NET.Vulkan" />
|
||||
<PackageReference Include="Silk.NET.Vulkan.Extensions.EXT" />
|
||||
<PackageReference Include="Silk.NET.Vulkan.Extensions.KHR" />
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Graphics.GAL;
|
||||
using Ryujinx.Graphics.Shader;
|
||||
using shaderc;
|
||||
using Silk.NET.Shaderc;
|
||||
using Silk.NET.Vulkan;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Result = shaderc.Result;
|
||||
|
||||
namespace Ryujinx.Graphics.Vulkan
|
||||
{
|
||||
class Shader : IDisposable
|
||||
{
|
||||
// The shaderc.net dependency's Options constructor and dispose are not thread safe.
|
||||
// Take this lock when using them.
|
||||
private static readonly Lock _shaderOptionsLock = new();
|
||||
|
||||
private static readonly nint _ptrMainEntryPointName = Marshal.StringToHGlobalAnsi("main");
|
||||
|
||||
private readonly Vk _api;
|
||||
@@ -75,38 +70,33 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
private unsafe static byte[] GlslToSpirv(string glsl, ShaderStage stage)
|
||||
{
|
||||
Options options;
|
||||
Shaderc api = Shaderc.GetApi();
|
||||
Compiler* compiler = api.CompilerInitialize();
|
||||
CompileOptions* options = api.CompileOptionsInitialize();
|
||||
|
||||
lock (_shaderOptionsLock)
|
||||
api.CompileOptionsSetSourceLanguage(options, SourceLanguage.Glsl);
|
||||
api.CompileOptionsSetTargetSpirv(options, SpirvVersion.Shaderc15);
|
||||
api.CompileOptionsSetTargetEnv(options, TargetEnv.Vulkan, Vk.Version12);
|
||||
|
||||
CompilationResult* scr = api.CompileIntoSpv(compiler, glsl, (nuint)glsl.Length, GetShaderCShaderStage(stage), "Ryu", "main", options);
|
||||
|
||||
CompilationStatus status = api.ResultGetCompilationStatus(scr);
|
||||
|
||||
if (status != CompilationStatus.Success)
|
||||
{
|
||||
options = new Options(false)
|
||||
{
|
||||
SourceLanguage = SourceLanguage.Glsl,
|
||||
TargetSpirVVersion = new SpirVVersion(1, 5),
|
||||
};
|
||||
}
|
||||
|
||||
options.SetTargetEnvironment(TargetEnvironment.Vulkan, EnvironmentVersion.Vulkan_1_2);
|
||||
Compiler compiler = new(options);
|
||||
Result scr = compiler.Compile(glsl, "Ryu", GetShaderCShaderStage(stage));
|
||||
|
||||
lock (_shaderOptionsLock)
|
||||
{
|
||||
options.Dispose();
|
||||
}
|
||||
|
||||
if (scr.Status != Status.Success)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Gpu, $"Shader compilation error: {scr.Status} {scr.ErrorMessage}");
|
||||
Logger.Error?.Print(LogClass.Gpu, $"Shader compilation error: {status} {api.ResultGetErrorMessageS(scr)}");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Span<byte> spirvBytes = new((void*)scr.CodePointer, (int)scr.CodeLength);
|
||||
Span<byte> spirvBytes = new(api.ResultGetBytes(scr), (int)api.ResultGetLength(scr));
|
||||
|
||||
byte[] code = new byte[(scr.CodeLength + 3) & ~3];
|
||||
byte[] code = new byte[(spirvBytes.Length + 3) & ~3];
|
||||
|
||||
spirvBytes.CopyTo(code.AsSpan()[..(int)scr.CodeLength]);
|
||||
spirvBytes.CopyTo(code.AsSpan()[..spirvBytes.Length]);
|
||||
|
||||
api.CompilerRelease(compiler);
|
||||
api.CompileOptionsRelease(options);
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -1088,5 +1088,33 @@ namespace Ryujinx.Ava.Systems.PlayReport
|
||||
|
||||
return $"Living on {messagePackObjectDictionary["LandName"].AsString()} Island";
|
||||
}
|
||||
|
||||
private static FormattedValue MiitopiaRPC(SparseMultiValue values)
|
||||
{
|
||||
if (values.Matched.TryGetValue("gold", out Value gold) && values.Matched.TryGetValue("stage", out Value location))
|
||||
{
|
||||
return $"{LocFinal(location.ToString())} with {gold} gold";
|
||||
}
|
||||
|
||||
if (values.Matched.TryGetValue("secret", out Value secret)) // Yes "secret" is unused, but it only appears in the MII selector.
|
||||
{
|
||||
return $"In the MII selector";
|
||||
}
|
||||
|
||||
return $"At the main menu";
|
||||
|
||||
static string LocFinal(string? location) => location switch
|
||||
{
|
||||
"0" => "Somewhere in Miitopia",
|
||||
"1" => "Wandering around Greenhorne",
|
||||
"2" => "Trodding through Neksdor",
|
||||
"3" => "Exploring The Realm of the Fey",
|
||||
"4" => "Burning their feet at Karkaton",
|
||||
"5" => "Soaring in the skies of Miitopia",
|
||||
"6" => "Fighting up The Sky Scraper",
|
||||
"7" => "Traveling Miitopia",
|
||||
_ => "Wandering"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,6 +132,12 @@ namespace Ryujinx.Ava.Systems.PlayReport
|
||||
.WithDescription("based on your island name.")
|
||||
.AddValueFormatter("AppCmn", AnimalCrossingNewHorizons_AppCommon)
|
||||
)
|
||||
.AddSpec(
|
||||
"01003da010e8a000", // Miitopia 01003da010e8a000
|
||||
spec => spec
|
||||
.WithDescription("based on gold count, report info only in the mii selector, and gamestage (progression)")
|
||||
.AddSparseMultiValueFormatter(["gold", "secret", "stage"], MiitopiaRPC)
|
||||
)
|
||||
);
|
||||
|
||||
private static string Playing(string game) => $"Playing {game}";
|
||||
|
||||
Reference in New Issue
Block a user