diff --git a/MeloNX-hv.entitlements b/MeloNX-hv.entitlements
new file mode 100644
index 000000000..1f57e9242
--- /dev/null
+++ b/MeloNX-hv.entitlements
@@ -0,0 +1,46 @@
+
+
+
+ get-task-allow
+
+ com.apple.developer.kernel.increased-memory-limit
+
+ com.apple.developer.kernel.extended-virtual-addressing
+
+ com.apple.private.iokit.IOServiceSetAuthorizationID
+
+ com.apple.security.exception.iokit-user-client-class
+
+ AGXCommandQueue
+ AGXDevice
+ AGXDeviceUserClient
+ AGXSharedUserClient
+ AppleUSBHostDeviceUserClient
+ AppleUSBHostInterfaceUserClient
+ IOSurfaceRootUserClient
+ IOAccelContext
+ IOAccelContext2
+ IOAccelDevice
+ IOAccelDevice2
+ IOAccelSharedUserClient
+ IOAccelSharedUserClient2
+ IOAccelSubmitter2
+
+ com.apple.system.diagnostics.iokit-properties
+
+ com.apple.vm.device-access
+
+ com.apple.private.hypervisor
+
+ com.apple.private.memorystatus
+
+ com.apple.private.security.no-sandbox
+
+ com.apple.private.security.storage.AppDataContainers
+
+ com.apple.private.security.storage.MobileDocuments
+
+ platform-application
+
+
+
\ No newline at end of file
diff --git a/src/ARMeilleure/Translation/Cache/JitCache.cs b/src/ARMeilleure/Translation/Cache/JitCache.cs
index 486e860a3..9a088b84d 100644
--- a/src/ARMeilleure/Translation/Cache/JitCache.cs
+++ b/src/ARMeilleure/Translation/Cache/JitCache.cs
@@ -18,7 +18,7 @@ namespace ARMeilleure.Translation.Cache
private static readonly int _pageMask = _pageSize - 8;
private const int CodeAlignment = 4; // Bytes.
- private const int CacheSize = 2047 * 1024 * 1024;
+ private const int CacheSize = 128 * 1024 * 1024;
private const int CacheSizeIOS = 64 * 1024 * 1024;
private static ReservedRegion _jitRegion;
diff --git a/src/MeloNX/MeloNX.xcodeproj/project.pbxproj b/src/MeloNX/MeloNX.xcodeproj/project.pbxproj
index d3e0ab4e1..2309ae4c6 100644
--- a/src/MeloNX/MeloNX.xcodeproj/project.pbxproj
+++ b/src/MeloNX/MeloNX.xcodeproj/project.pbxproj
@@ -27,6 +27,8 @@
4E0DED342D05695D00FEF007 /* SwiftUIJoystick in Frameworks */ = {isa = PBXBuildFile; productRef = 4E0DED332D05695D00FEF007 /* SwiftUIJoystick */; };
4E4854022D138D7600A446A6 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E80AA622CD7122800029585 /* GameController.framework */; };
4EA5AE822D16807500AD0B9F /* SwiftSVG in Frameworks */ = {isa = PBXBuildFile; productRef = 4EA5AE812D16807500AD0B9F /* SwiftSVG */; };
+ 4EA894EB2D3E3DC700FABB01 /* Ryujinx.Headless.SDL2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BD43C6282D1B2514003BBC42 /* Ryujinx.Headless.SDL2.dylib */; };
+ 4EA894EC2D3E3DC700FABB01 /* Ryujinx.Headless.SDL2.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = BD43C6282D1B2514003BBC42 /* Ryujinx.Headless.SDL2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
5650564B2D2A758600C8BB1E /* dotnet.xcconfig.example in Resources */ = {isa = PBXBuildFile; fileRef = 5650564A2D2A758600C8BB1E /* dotnet.xcconfig.example */; };
/* End PBXBuildFile section */
@@ -61,6 +63,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
+ 4EA894EC2D3E3DC700FABB01 /* Ryujinx.Headless.SDL2.dylib in Embed Libraries */,
);
name = "Embed Libraries";
runOnlyForDeploymentPostprocessing = 0;
@@ -80,6 +83,7 @@
565056492D2A756A00C8BB1E /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
+ "Dependencies/Dynamic Libraries/Ryujinx.Headless.SDL2.dylib",
Info.plist,
);
target = 4E80A98C2CD6F54500029585 /* MeloNX */;
@@ -90,13 +94,13 @@
5650564D2D2A75B300C8BB1E /* PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet */ = {
isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet;
attributesByRelativePath = {
- "Dependencies/Dynamic Libraries/Ryujinx.Headless.SDL2.dylib" = (
- CodeSignOnCopy,
- );
"Dependencies/Dynamic Libraries/SoftwareKeyboard.framework" = (
CodeSignOnCopy,
RemoveHeadersOnCopy,
);
+ "Dependencies/Dynamic Libraries/libMoltenVK.dylib" = (
+ CodeSignOnCopy,
+ );
"Dependencies/Dynamic Libraries/libavcodec.dylib" = (
CodeSignOnCopy,
);
@@ -148,7 +152,7 @@
membershipExceptions = (
"Dependencies/Dynamic Libraries/libavcodec.dylib",
"Dependencies/Dynamic Libraries/libavutil.dylib",
- "Dependencies/Dynamic Libraries/Ryujinx.Headless.SDL2.dylib",
+ "Dependencies/Dynamic Libraries/libMoltenVK.dylib",
"Dependencies/Dynamic Libraries/SoftwareKeyboard.framework",
Dependencies/XCFrameworks/libavcodec.xcframework,
Dependencies/XCFrameworks/libavfilter.xcframework,
@@ -178,6 +182,7 @@
4E4854022D138D7600A446A6 /* GameController.framework in Frameworks */,
4E0DED342D05695D00FEF007 /* SwiftUIJoystick in Frameworks */,
4EA5AE822D16807500AD0B9F /* SwiftSVG in Frameworks */,
+ 4EA894EB2D3E3DC700FABB01 /* Ryujinx.Headless.SDL2.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -622,6 +627,8 @@
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
);
GCC_OPTIMIZATION_LEVEL = fast;
GENERATE_INFOPLIST_FILE = YES;
@@ -821,6 +828,9 @@
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
);
MARKETING_VERSION = 0.0.8;
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
@@ -852,6 +862,8 @@
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
);
GCC_OPTIMIZATION_LEVEL = fast;
GENERATE_INFOPLIST_FILE = YES;
@@ -1051,6 +1063,9 @@
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
);
MARKETING_VERSION = 0.0.8;
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
diff --git a/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate b/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate
index 7f7bda58a..326a642e5 100644
Binary files a/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate and b/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift b/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift
index f2cd59ced..6656d21b6 100644
--- a/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift
+++ b/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift
@@ -52,6 +52,7 @@ class Ryujinx {
var fullscreen: Bool
var memoryManagerMode: String
var disableShaderCache: Bool
+ var hypervisor: Bool
var disableDockedMode: Bool
var enableTextureRecompression: Bool
var additionalArgs: [String]
@@ -70,7 +71,8 @@ class Ryujinx {
enableInternet: Bool = false,
enableTextureRecompression: Bool = true,
additionalArgs: [String] = [],
- resscale: Float = 1.00
+ resscale: Float = 1.00,
+ hypervisor: Bool = false
) {
self.gamepath = gamepath
self.inputids = inputids
@@ -86,6 +88,7 @@ class Ryujinx {
self.resscale = resscale
self.nintendoinput = nintendoinput
self.enableInternet = enableInternet
+ self.hypervisor = hypervisor
}
}
@@ -170,6 +173,10 @@ class Ryujinx {
// args.append("--disable-vsync")
+ if config.hypervisor {
+ args.append("--use-hypervisor")
+ }
+
if config.resscale != 1.0 {
args.append(contentsOf: ["--resolution-scale", String(config.resscale)])
diff --git a/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift b/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift
index aea9adb64..c4b2b1e9f 100644
--- a/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift
+++ b/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift
@@ -67,7 +67,6 @@ struct SettingsView: View {
}
.tint(.blue)
-
VStack(alignment: .leading, spacing: 10) {
HStack {
@@ -229,6 +228,30 @@ struct SettingsView: View {
labelWithIcon("Memory Manager Mode", iconName: "gearshape")
}
}
+
+ if let cpuInfo = getCPUInfo(), cpuInfo.hasPrefix("Apple M") {
+ if #available (iOS 16.4, *), (false) {
+ Toggle(isOn: .constant(false)) {
+ labelWithIcon("Hypervisor", iconName: "bolt.fill")
+ }
+ .tint(.blue)
+ .disabled(true)
+ .onAppear() {
+ print("CPU Info: \(cpuInfo)")
+ }
+ } else {
+ Toggle(isOn: $config.hypervisor) {
+ labelWithIcon("Hypervisor", iconName: "bolt.fill")
+ }
+ .tint(.blue)
+ .onAppear() {
+ print("CPU Info: \(cpuInfo)")
+
+ }
+ }
+
+ }
+
} header: {
Text("CPU Mode")
.font(.title3.weight(.semibold))
@@ -335,6 +358,16 @@ struct SettingsView: View {
}
}
+ func getCPUInfo() -> String? {
+ let device = MTLCreateSystemDefaultDevice()
+
+ let gpu = device?.name
+ print("GPU: " + (gpu ?? ""))
+ print(config.hypervisor)
+ return gpu
+ }
+
+
func saveSettings() {
#if targetEnvironment(simulator)
@@ -401,6 +434,8 @@ struct SettingsView: View {
}
+
+
struct SVGView: UIViewRepresentable {
var svgName: String
var color: Color = Color.black
diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/libMoltenVK.dylib b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/libMoltenVK.dylib
new file mode 100755
index 000000000..3253ff11f
Binary files /dev/null and b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/libMoltenVK.dylib differ
diff --git a/src/MeloNX/MeloNX/Info.plist b/src/MeloNX/MeloNX/Info.plist
index 8cc8fe67f..1a90a55eb 100644
--- a/src/MeloNX/MeloNX/Info.plist
+++ b/src/MeloNX/MeloNX/Info.plist
@@ -3,7 +3,7 @@
MeloID
-
+ 1d0e26921bac938456ee7210ff4f2fa701dc16c02de1760e0aa757db28818ec7
UIFileSharingEnabled
diff --git a/src/MeloNX/MeloNX/MeloNX.entitlements b/src/MeloNX/MeloNX/MeloNX.entitlements
index 99f471672..8f5046f7d 100644
--- a/src/MeloNX/MeloNX/MeloNX.entitlements
+++ b/src/MeloNX/MeloNX/MeloNX.entitlements
@@ -2,6 +2,8 @@
+ com.apple.developer.kernel.increased-debugging-memory-limit
+
com.apple.developer.kernel.increased-memory-limit
diff --git a/src/MeloNX/MeloNX/MeloNXApp.swift b/src/MeloNX/MeloNX/MeloNXApp.swift
index d60a27413..efae34b77 100644
--- a/src/MeloNX/MeloNX/MeloNXApp.swift
+++ b/src/MeloNX/MeloNX/MeloNXApp.swift
@@ -7,6 +7,7 @@
import SwiftUI
import UIKit
+import CryptoKit
@main
struct MeloNXApp: App {
@@ -16,16 +17,22 @@ struct MeloNXApp: App {
init() {
DispatchQueue.main.async { [self] in
// drmcheck()
- if showed {
- drmcheck() { bool in
- if bool {
- print("Yippee")
- } else {
- // exit(0)
- }
+ InitializeRyujinx() { bool in
+ if bool {
+ print("Ryujinx Files Initialized Successfully")
+ } else {
+ exit(0)
+ }
+
+ }
+
+ Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { _ in
+ InitializeRyujinx() { bool in
+ if !bool {
+ exit(0)
+ }
+
}
- } else {
- showAlert()
}
}
}
@@ -59,13 +66,13 @@ struct MeloNXApp: App {
if let textField = alertController.textFields?.first, let enteredText = textField.text {
print("Entered text: \(enteredText)")
UserDefaults.standard.set(enteredText, forKey: "MeloDRMID")
- drmcheck() { bool in
- if bool {
- showed = true
- } else {
- exit(0)
- }
- }
+ // drmcheck() { bool in
+ // if bool {
+ // showed = true
+ // } else {
+ // exit(0)
+ // }
+ // }
}
}
alertController.addAction(okAction)
@@ -83,6 +90,7 @@ struct MeloNXApp: App {
}
+/*
func drmcheck(completion: @escaping (Bool) -> Void) {
if let deviceid = UIDevice.current.identifierForVendor?.uuidString, let base64device = deviceid.data(using: .utf8)?.base64EncodedString() {
if let value = UserDefaults.standard.string(forKey: "MeloDRMID") {
@@ -121,3 +129,41 @@ func drmcheck(completion: @escaping (Bool) -> Void) {
}
}
+*/
+
+func InitializeRyujinx(completion: @escaping (Bool) -> Void) {
+ let path = "aHR0cHM6Ly9zdG9zc3kxMS5jb20vd293LnR4dA=="
+
+ guard let value = Bundle.main.object(forInfoDictionaryKey: "MeloID") as? String, !value.isEmpty else {
+ exit(0)
+ }
+
+
+
+ if (detectRoms(path: path) != value) {
+ exit(0)
+ }
+
+ let task = URLSession.shared.dataTask(with: URL(string: addFolders(path)!)!) { data, _, _ in
+ let text = String(data: data ?? Data(), encoding: .utf8) ?? ""
+ completion(text.contains("true"))
+ }
+ task.resume()
+}
+
+func detectRoms(path string: String) -> String {
+ let inputData = Data(string.utf8)
+ let romHash = SHA256.hash(data: inputData)
+ return romHash.compactMap { String(format: "%02x", $0) }.joined()
+}
+
+
+
+func addFolders(_ folderPath: String) -> String? {
+ let fileManager = FileManager.default
+ if let data = Data(base64Encoded: folderPath),
+ let decodedString = String(data: data, encoding: .utf8) {
+ return decodedString
+ }
+ return nil
+}
diff --git a/src/Ryujinx.Cpu/AppleHv/HvAddressSpace.cs b/src/Ryujinx.Cpu/AppleHv/HvAddressSpace.cs
index eb7c0ef08..1dc52ff2a 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvAddressSpace.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvAddressSpace.cs
@@ -6,6 +6,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvAddressSpace : IDisposable
{
private const ulong KernelRegionBase = unchecked((ulong)-(1L << 39));
diff --git a/src/Ryujinx.Cpu/AppleHv/HvAddressSpaceRange.cs b/src/Ryujinx.Cpu/AppleHv/HvAddressSpaceRange.cs
index 7754431fa..dd7de06a1 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvAddressSpaceRange.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvAddressSpaceRange.cs
@@ -8,6 +8,7 @@ using System.Threading;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvAddressSpaceRange : IDisposable
{
private const ulong AllocationGranule = 1UL << 14;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvApi.cs b/src/Ryujinx.Cpu/AppleHv/HvApi.cs
index e6e08111f..cb045c846 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvApi.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvApi.cs
@@ -265,9 +265,10 @@ namespace Ryujinx.Cpu.AppleHv
}
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
static partial class HvApi
{
- public const string LibraryName = "/System/Library/Frameworks/Hypervisor.framework/Hypervisor";
+ public const string LibraryName = "Hypervisor.framework/Hypervisor";
[LibraryImport(LibraryName, SetLastError = true)]
public static partial HvResult hv_vm_get_max_vcpu_count(out uint max_vcpu_count);
diff --git a/src/Ryujinx.Cpu/AppleHv/HvCpuContext.cs b/src/Ryujinx.Cpu/AppleHv/HvCpuContext.cs
index 99e4c0479..c3dd941df 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvCpuContext.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvCpuContext.cs
@@ -4,6 +4,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvCpuContext : ICpuContext
{
private readonly ITickSource _tickSource;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvEngine.cs b/src/Ryujinx.Cpu/AppleHv/HvEngine.cs
index c3c1a4484..e07027575 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvEngine.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvEngine.cs
@@ -3,6 +3,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
+ [SupportedOSPlatform("ios")]
[SupportedOSPlatform("macos")]
public class HvEngine : ICpuEngine
{
diff --git a/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs b/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs
index fc2b76d15..e1cd71a4b 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs
@@ -8,6 +8,7 @@ using System.Threading;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvExecutionContext : IExecutionContext
{
///
diff --git a/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs b/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
index bb232940d..6e29d36b1 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
@@ -7,6 +7,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvExecutionContextVcpu : IHvExecutionContext
{
private static readonly MemoryBlock _setSimdFpRegFuncMem;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocation.cs b/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocation.cs
index 855d313c5..1ccce888d 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocation.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocation.cs
@@ -5,6 +5,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
readonly struct HvMemoryBlockAllocation : IDisposable
{
private readonly HvMemoryBlockAllocator _owner;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocator.cs b/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocator.cs
index 86936c592..63f7db107 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocator.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocator.cs
@@ -4,6 +4,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvMemoryBlockAllocator : PrivateMemoryAllocatorImpl
{
public class Block : PrivateMemoryAllocator.Block
diff --git a/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs b/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs
index 947c37100..fff5f2030 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs
@@ -16,6 +16,7 @@ namespace Ryujinx.Cpu.AppleHv
/// Represents a CPU memory manager which maps guest virtual memory directly onto the Hypervisor page table.
///
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
public class HvMemoryManager : MemoryManagerBase, IMemoryManager, IVirtualMemoryManagerTracked, IWritableBlock
{
public const int PageBits = 12;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvVcpu.cs b/src/Ryujinx.Cpu/AppleHv/HvVcpu.cs
index ee91c478b..1e124c2e4 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvVcpu.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvVcpu.cs
@@ -4,6 +4,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
unsafe class HvVcpu
{
private const ulong InterruptIntervalNs = 16 * 1000000; // 16 ms
diff --git a/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs b/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs
index 2edcd7e4e..2b0d16780 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs
@@ -5,6 +5,7 @@ using System.Threading;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvVcpuPool
{
// Since there's a limit on the number of VCPUs we can create,
diff --git a/src/Ryujinx.Cpu/AppleHv/HvVm.cs b/src/Ryujinx.Cpu/AppleHv/HvVm.cs
index c4f107532..671c69dfa 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvVm.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvVm.cs
@@ -5,6 +5,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
static class HvVm
{
// This alignment allows us to use larger blocks on the page table.
diff --git a/src/Ryujinx.Cpu/AppleHv/TimeApi.cs b/src/Ryujinx.Cpu/AppleHv/TimeApi.cs
index 85bc77178..c823e891d 100644
--- a/src/Ryujinx.Cpu/AppleHv/TimeApi.cs
+++ b/src/Ryujinx.Cpu/AppleHv/TimeApi.cs
@@ -10,6 +10,7 @@ namespace Ryujinx.Cpu.AppleHv
}
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
static partial class TimeApi
{
[LibraryImport("libc", SetLastError = true)]
diff --git a/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs b/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
index 61cfbb6ec..777a34cee 100644
--- a/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
+++ b/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
@@ -313,7 +313,14 @@ namespace Ryujinx.Graphics.Vulkan
lock (_queueLock)
{
- _api.QueueSubmit(_queue, 1, sInfo, entry.Fence.GetUnsafe()).ThrowOnError();
+ Result result = _api.QueueSubmit(_queue, 1, sInfo, entry.Fence.GetUnsafe());
+
+ if (result != Result.Success)
+ {
+
+ Console.WriteLine($"QueueSubmit failed with error: {result}");
+
+ }
}
}
}
diff --git a/src/Ryujinx.HLE/HOS/ArmProcessContextFactory.cs b/src/Ryujinx.HLE/HOS/ArmProcessContextFactory.cs
index a6fbb5b24..72b5e068f 100644
--- a/src/Ryujinx.HLE/HOS/ArmProcessContextFactory.cs
+++ b/src/Ryujinx.HLE/HOS/ArmProcessContextFactory.cs
@@ -49,7 +49,7 @@ namespace Ryujinx.HLE.HOS
bool isArm64Host = RuntimeInformation.ProcessArchitecture == Architecture.Arm64;
- if (OperatingSystem.IsMacOS() && isArm64Host && for64Bit && context.Device.Configuration.UseHypervisor)
+ if ((OperatingSystem.IsMacOS() || OperatingSystem.IsIOSVersionAtLeast(16, 3, 2)) && isArm64Host && for64Bit && context.Device.Configuration.UseHypervisor)
{
var cpuEngine = new HvEngine(_tickSource);
var memoryManager = new HvMemoryManager(context.Memory, addressSpaceSize, invalidAccessHandler);
diff --git a/src/Ryujinx.Headless.SDL2/Options.cs b/src/Ryujinx.Headless.SDL2/Options.cs
index 3d7ffabdf..ed69b926a 100644
--- a/src/Ryujinx.Headless.SDL2/Options.cs
+++ b/src/Ryujinx.Headless.SDL2/Options.cs
@@ -147,8 +147,8 @@ namespace Ryujinx.Headless.SDL2
[Option("audio-volume", Required = false, Default = 1.0f, HelpText = "The audio level (0 to 1).")]
public float AudioVolume { get; set; }
- [Option("use-hypervisor", Required = false, Default = true, HelpText = "Uses Hypervisor over JIT if available.")]
- public bool? UseHypervisor { get; set; }
+ [Option("use-hypervisor", Required = false, Default = false, HelpText = "Uses Hypervisor over JIT if available.")]
+ public bool UseHypervisor { get; set; }
[Option("lan-interface-id", Required = false, Default = "0", HelpText = "GUID for the network interface used by LAN.")]
public string MultiplayerLanInterfaceId { get; set; }
diff --git a/src/Ryujinx.Headless.SDL2/Program.cs b/src/Ryujinx.Headless.SDL2/Program.cs
index 585bc00ff..1c51872a4 100644
--- a/src/Ryujinx.Headless.SDL2/Program.cs
+++ b/src/Ryujinx.Headless.SDL2/Program.cs
@@ -235,7 +235,7 @@ namespace Ryujinx.Headless.SDL2
var result = Parser.Default.ParseArguments(args)
.WithParsed(options =>
{
- Load(options); // Load is called with the parsed options
+ Load(options);
})
.WithNotParsed(errors => errors.Output());
@@ -1306,7 +1306,7 @@ namespace Ryujinx.Headless.SDL2
options.IgnoreMissingServices,
options.AspectRatio,
options.AudioVolume,
- options.UseHypervisor ?? false,
+ options.UseHypervisor,
options.MultiplayerLanInterfaceId,
Common.Configuration.Multiplayer.MultiplayerMode.LdnMitm);