2.5,
@ -998,7 +998,7 @@
|
||||
"$(PROJECT_DIR)/Pomelo/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/Pomelo/Dependencies/Dynamic\\ Libraries",
|
||||
);
|
||||
MARKETING_VERSION = 2.3;
|
||||
MARKETING_VERSION = 2.5;
|
||||
OTHER_LDFLAGS = "-lSudachi";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.Pomelo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@ -1065,7 +1065,7 @@
|
||||
"$(PROJECT_DIR)/Pomelo/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/Pomelo/Dependencies/Dynamic\\ Libraries",
|
||||
);
|
||||
MARKETING_VERSION = 2.3;
|
||||
MARKETING_VERSION = 2.5;
|
||||
OTHER_LDFLAGS = "-lSudachi";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.Pomelo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
BIN
Pomelo/Assets.xcassets/AppIcon.appiconset/AppIcon1024x1024.png
Normal file
After Width: | Height: | Size: 562 KiB |
@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "fun 1.png",
|
||||
"filename" : "AppIcon1024x1024.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
21
Pomelo/Assets.xcassets/secondary-dark.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "secondary-dark.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
Pomelo/Assets.xcassets/secondary-dark.imageset/secondary-dark.png
vendored
Normal file
After Width: | Height: | Size: 1.8 MiB |
@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "fun 1.png",
|
||||
"filename" : "secondary1024x1024 1.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@ -13,6 +13,7 @@
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "secondary1024x1024.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
Before Width: | Height: | Size: 154 KiB |
After Width: | Height: | Size: 1.7 MiB |
After Width: | Height: | Size: 1.8 MiB |
@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "fun 1.png",
|
||||
"filename" : "secondary.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
|
BIN
Pomelo/Assets.xcassets/secondary.imageset/fun 1.png
vendored
Before Width: | Height: | Size: 154 KiB |
BIN
Pomelo/Assets.xcassets/secondary.imageset/secondary.png
vendored
Normal file
After Width: | Height: | Size: 1.7 MiB |
36
Pomelo/Assets.xcassets/third.appiconset/Contents.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "fun 2.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "tinted"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
21
Pomelo/Assets.xcassets/third.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "fun 1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
@ -18,7 +18,6 @@ struct ContentView: View {
|
||||
@AppStorage("useTrollStore") var useTrollStore: Bool = false
|
||||
@AppStorage("showMetalHUD") var showMetalHUD: Bool = false
|
||||
@AppStorage("canShowMetalHUD") var canShowMetalHUD: Bool = false
|
||||
@AppStorage("HideMenuButton") private var HideMenuButton: Bool = true
|
||||
@State var core = Core(games: [], root: FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0])
|
||||
var body: some View {
|
||||
//NavView(core: $core) // pain and suffering
|
||||
@ -28,10 +27,8 @@ struct ContentView: View {
|
||||
components.host == "game",
|
||||
let text = components.queryItems?.first(where: { $0.name == "id" })?.value {
|
||||
print(text)
|
||||
let isJIT = UserDefaults.standard.bool(forKey: "JIT-ENABLED")
|
||||
|
||||
urlgame = core.games.map(\.self).first(where: { String(describing: $0.programid) == text })
|
||||
print(urlgame)
|
||||
urlgame = core.games.first(where: { String(describing: $0.programid) == text }) // i had .map(\.self) here that broke compiling on other Xcode versions
|
||||
}
|
||||
})
|
||||
.onAppear() {
|
||||
|
@ -174,7 +174,7 @@ struct ControllerView: View {
|
||||
motion.valueChangedHandler = { motion in
|
||||
// Get current time
|
||||
let currentTimestamp = Date().timeIntervalSince1970
|
||||
let deltaTimestamp = Int32((currentTimestamp - lastTimestamp) * 1000) // Difference in milliseconds
|
||||
// let deltaTimestamp = Int32((currentTimestamp - lastTimestamp) * 1000) // Difference in milliseconds
|
||||
|
||||
// Update last timestamp
|
||||
lastTimestamp = currentTimestamp
|
||||
|
@ -42,9 +42,7 @@ class MotionManager : ObservableObject {
|
||||
|
||||
func stopGyros() {
|
||||
print("stop")
|
||||
if self.timer != nil {
|
||||
self.timer.invalidate()
|
||||
self.motion.stopGyroUpdates()
|
||||
}
|
||||
self.timer.invalidate()
|
||||
self.motion.stopGyroUpdates()
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ class SudachiEmulationViewModel: ObservableObject {
|
||||
|
||||
iscustom = ((sudachiGame?.fileURL.startAccessingSecurityScopedResource()) != nil)
|
||||
|
||||
print(sudachiGame)
|
||||
|
||||
print("is outside url? \(iscustom ? "Yes" : "no")")
|
||||
DispatchQueue.global(qos: .userInteractive).async { [self] in
|
||||
|
@ -10,6 +10,7 @@ import Sudachi
|
||||
import Foundation
|
||||
import GameController
|
||||
import UIKit
|
||||
import Darwin.POSIX.dlfcn
|
||||
|
||||
|
||||
struct SudachiEmulationView: View {
|
||||
@ -26,7 +27,8 @@ struct SudachiEmulationView: View {
|
||||
@State private var timer: Timer?
|
||||
@Environment(\.scenePhase) var scenePhase
|
||||
@AppStorage("isairplay") private var isairplay: Bool = true
|
||||
@AppStorage("HideMenuButton") private var HideMenuButton: Bool = true
|
||||
@AppStorage("ShowMenuButton") private var ShowMenuButton: Bool = true
|
||||
@AppStorage("showfunnibackground") private var showbackground: Bool = false
|
||||
let documentsDir = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
|
||||
@Environment(\.presentationMode) var presentationMode
|
||||
|
||||
@ -37,14 +39,17 @@ struct SudachiEmulationView: View {
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
|
||||
if #available(iOS 18.0, *), showbackground {
|
||||
BackgroundView()
|
||||
.ignoresSafeArea(.all)
|
||||
}
|
||||
if !isairplay {
|
||||
SudachiMetalView(viewModel: viewModel, mtkview: $mtkview, device: $device)
|
||||
}
|
||||
|
||||
|
||||
ControllerView()
|
||||
if !HideMenuButton {
|
||||
if ShowMenuButton {
|
||||
VStack {
|
||||
HStack {
|
||||
Spacer()
|
||||
@ -218,3 +223,30 @@ struct SizePreferenceKey: PreferenceKey {
|
||||
value = nextValue()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct BackgroundView: UIViewRepresentable {
|
||||
// This method creates and returns a UIView from the Apple Intelligence Lighting API.
|
||||
func makeUIView(context: Context) -> UIView {
|
||||
// Open the SwiftUICore framework dynamically.
|
||||
let handle = dlopen("/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore", RTLD_NOW)
|
||||
|
||||
// Get the symbol for "CoreViewMakeIntelligenceLightSourceView".
|
||||
guard let symbol = dlsym(handle, "CoreViewMakeIntelligenceLightSourceView") else {
|
||||
return UIView() // Return an empty UIView if symbol is not found
|
||||
}
|
||||
|
||||
// Cast the symbol to a function that returns a UIView.
|
||||
let casted = unsafeBitCast(symbol, to: (@convention(thin) () -> UIView).self)
|
||||
let myView = casted()
|
||||
|
||||
// Set the view to fill the entire screen.
|
||||
myView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
myView.frame = UIScreen.main.bounds
|
||||
|
||||
return myView
|
||||
}
|
||||
|
||||
// Required by UIViewRepresentable, but no updates are needed here.
|
||||
func updateUIView(_ uiView: UIView, context: Context) {}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ func enableMetalHUD() {
|
||||
}
|
||||
|
||||
func openMetalDylib() -> Bool {
|
||||
var path = "/usr/lib/libMTLHud.dylib"
|
||||
let path = "/usr/lib/libMTLHud.dylib"
|
||||
|
||||
// Load the dynamic library
|
||||
if dlopen(path, RTLD_NOW) != nil {
|
||||
|
@ -143,6 +143,7 @@ class SudachiScreenView: UIView {
|
||||
primaryScreen = MTKView(frame: .zero, device: MTLCreateSystemDefaultDevice())
|
||||
primaryScreen.translatesAutoresizingMaskIntoConstraints = false
|
||||
primaryScreen.clipsToBounds = true
|
||||
primaryScreen.layer.backgroundColor = UIColor.secondarySystemBackground.cgColor
|
||||
primaryScreen.layer.borderColor = UIColor.secondarySystemBackground.cgColor
|
||||
primaryScreen.layer.borderWidth = 3
|
||||
primaryScreen.layer.cornerCurve = .continuous
|
||||
@ -174,6 +175,7 @@ class SudachiScreenView: UIView {
|
||||
primaryScreen = MTKView(frame: .zero, device: MTLCreateSystemDefaultDevice())
|
||||
primaryScreen.translatesAutoresizingMaskIntoConstraints = false
|
||||
primaryScreen.clipsToBounds = true
|
||||
primaryScreen.layer.backgroundColor = UIColor.secondarySystemBackground.cgColor
|
||||
primaryScreen.layer.borderColor = UIColor.secondarySystemBackground.cgColor
|
||||
primaryScreen.layer.borderWidth = 3
|
||||
primaryScreen.layer.cornerCurve = .continuous
|
||||
@ -214,8 +216,17 @@ class SudachiScreenView: UIView {
|
||||
removeConstraints(portraitconstraints)
|
||||
removeConstraints(landscapeconstraints)
|
||||
|
||||
let isPortrait = UIApplication.shared.statusBarOrientation.isPortrait
|
||||
let isPortrait = getInterfaceOrientation().isPortrait
|
||||
addConstraints(isPortrait ? portraitconstraints : landscapeconstraints)
|
||||
}
|
||||
}
|
||||
|
||||
func getInterfaceOrientation() -> UIInterfaceOrientation {
|
||||
guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
||||
let orientation = windowScene.keyWindow?.windowScene?.interfaceOrientation
|
||||
else {
|
||||
return .unknown
|
||||
}
|
||||
return orientation
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ class PomeloFileManager {
|
||||
]
|
||||
|
||||
}
|
||||
return folders as! [String : [String : String]]
|
||||
return folders
|
||||
}
|
||||
|
||||
func createdirectories() throws {
|
||||
@ -154,6 +154,7 @@ class LibraryManager {
|
||||
print("uhoh how unfortunate for some reason FileManager.default.enumerator aint workin")
|
||||
throw LibManError.ripenum
|
||||
}
|
||||
let core = Core(games: [], root: URL(string: "/")!)
|
||||
|
||||
let sudachi = Sudachi.shared
|
||||
var urls: [URL] = []
|
||||
@ -161,7 +162,7 @@ class LibraryManager {
|
||||
if let file = files as? URL {
|
||||
let getaboutfile = try file.resourceValues(forKeys: [.isRegularFileKey])
|
||||
if let isfile = getaboutfile.isRegularFile, isfile {
|
||||
if ["nca", "nro", "nsp", "nso", "xci"].contains(file.pathExtension.lowercased()) {
|
||||
if core.supportedFileTypes.contains(file.pathExtension.lowercased()) {
|
||||
urls.append(file)
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct PomeloGame : Comparable, Hashable, Identifiable {
|
||||
var id = UUID()
|
||||
@ -18,6 +19,179 @@ struct PomeloGame : Comparable, Hashable, Identifiable {
|
||||
let imageData: Data
|
||||
let title: String
|
||||
|
||||
|
||||
let settings: [Setting] = [
|
||||
// Core
|
||||
Setting(category: "Core", name: "use_multi_core", description: "Enable multi-core", value: true, type: .toggle),
|
||||
Setting(category: "Core", name: "use_unsafe_extended_memory_layout", description: "Enable unsafe extended memory layout", value: false, type: .toggle),
|
||||
|
||||
// CPU
|
||||
Setting(category: "Cpu", name: "cpu_accuracy", description: "CPU accuracy", value: 0.0, type: .slider, range: 0...2),
|
||||
Setting(category: "Cpu", name: "cpu_debug_mode", description: "Enable CPU debug mode", value: false, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_page_tables", description: "Enable page tables optimization", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_block_linking", description: "Enable block linking optimization", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_return_stack_buffer", description: "Enable return stack buffer optimization", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_fast_dispatcher", description: "Enable fast dispatcher optimization", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_context_elimination", description: "Enable context elimination optimization", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_const_prop", description: "Enable constant propagation", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_misc_ir", description: "Enable miscellaneous CPU optimizations", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_reduce_misalign_checks", description: "Reduce memory misalignment checks", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_fastmem", description: "Enable fast memory access", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_fastmem_exclusives", description: "Enable exclusive memory optimization", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_recompile_exclusives", description: "Enable recompile exclusives", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_ignore_memory_aborts", description: "Ignore memory aborts", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_unsafe_unfuse_fma", description: "Enable unsafe FMA unfuse", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_unsafe_reduce_fp_error", description: "Reduce floating-point error", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_unsafe_ignore_standard_fpcr", description: "Ignore standard FPCR", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_unsafe_inaccurate_nan", description: "Inaccurate NaN handling", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_unsafe_fastmem_check", description: "Disable fast memory checks", value: true, type: .toggle),
|
||||
Setting(category: "Cpu", name: "cpuopt_unsafe_ignore_global_monitor", description: "Ignore global monitor", value: true, type: .toggle),
|
||||
|
||||
// Renderer
|
||||
Setting(category: "Renderer", name: "backend", description: "Backend API", value: 1.0, type: .slider, range: 0...2),
|
||||
Setting(category: "Renderer", name: "async_presentation", description: "Enable async presentation", value: true, type: .toggle),
|
||||
Setting(category: "Renderer", name: "force_max_clock", description: "Force max GPU clock", value: false, type: .toggle),
|
||||
Setting(category: "Renderer", name: "debug", description: "Enable debug mode", value: false, type: .toggle),
|
||||
Setting(category: "Renderer", name: "renderer_shader_feedback", description: "Enable shader feedback", value: false, type: .toggle),
|
||||
Setting(category: "Renderer", name: "nsight_aftermath", description: "Enable Nsight Aftermath", value: false, type: .toggle),
|
||||
Setting(category: "Renderer", name: "disable_shader_loop_safety_checks", description: "Disable shader loop safety checks", value: false, type: .toggle),
|
||||
Setting(category: "Renderer", name: "resolution_setup", description: "Resolution setup", value: 2.0, type: .slider, range: 0...7),
|
||||
Setting(category: "Renderer", name: "scaling_filter", description: "Scaling filter", value: 1.0, type: .slider, range: 0...5),
|
||||
Setting(category: "Renderer", name: "anti_aliasing", description: "Anti-Aliasing", value: 0.0, type: .slider, range: 0...1),
|
||||
Setting(category: "Renderer", name: "fullscreen_mode", description: "Fullscreen mode", value: 0.0, type: .slider, range: 0...1),
|
||||
Setting(category: "Renderer", name: "aspect_ratio", description: "Aspect ratio", value: 0.0, type: .slider, range: 0...4),
|
||||
Setting(category: "Renderer", name: "max_anisotropy", description: "Anisotropic filtering", value: 0.0, type: .slider, range: 0...4),
|
||||
Setting(category: "Renderer", name: "use_vsync", description: "VSync mode", value: 1.0, type: .slider, range: 0...3),
|
||||
|
||||
// Audio
|
||||
Setting(category: "Audio", name: "output_engine", description: "Audio output engine", value: "auto", type: .textField),
|
||||
Setting(category: "Audio", name: "output_device", description: "Audio output device", value: "auto", type: .textField),
|
||||
Setting(category: "Audio", name: "volume", description: "Output volume", value: 100.0, type: .slider, range: 0...100),
|
||||
|
||||
// Data Storage
|
||||
Setting(category: "Data Storage", name: "use_virtual_sd", description: "Use virtual SD card", value: false, type: .toggle),
|
||||
Setting(category: "Data Storage", name: "gamecard_inserted", description: "Enable gamecard emulation", value: false, type: .toggle),
|
||||
|
||||
// System
|
||||
Setting(category: "System", name: "use_docked_mode", description: "Enable docked mode", value: false, type: .toggle),
|
||||
Setting(category: "System", name: "rng_seed_enabled", description: "Enable RNG seed", value: false, type: .toggle),
|
||||
Setting(category: "System", name: "rng_seed", description: "RNG seed value", value: "12345", type: .textField),
|
||||
Setting(category: "System", name: "custom_rtc_enabled", description: "Enable custom RTC", value: false, type: .toggle),
|
||||
Setting(category: "System", name: "language_index", description: "System language", value: 1.0, type: .slider, range: 0...17),
|
||||
Setting(category: "System", name: "region_index", description: "System region", value: -1.0, type: .slider, range: -1...6),
|
||||
|
||||
// Miscellaneous
|
||||
Setting(category: "Miscellaneous", name: "log_filter", description: "Log filter", value: "*:Trace", type: .textField),
|
||||
|
||||
// Debugging
|
||||
Setting(category: "Debugging", name: "record_frame_times", description: "Record frame times", value: false, type: .toggle),
|
||||
Setting(category: "Debugging", name: "reporting_services", description: "Verbose reporting services", value: false, type: .toggle)
|
||||
]
|
||||
|
||||
/*
|
||||
let settings: [String: [String: String]] = [
|
||||
"Core": [
|
||||
"use_multi_core": "Whether to use multi-core for CPU emulation (0: Disabled, 1 (default): Enabled)",
|
||||
"use_unsafe_extended_memory_layout": "Enable unsafe extended guest system memory layout (8GB DRAM) (0 (default): Disabled, 1: Enabled)"
|
||||
],
|
||||
"Cpu": [
|
||||
"cpu_accuracy": "Adjusts various optimizations (0 (default): Auto-select, 1: Accurate, 2: Unsafe)",
|
||||
"cpu_debug_mode": "Allow disabling safe optimizations (0 (default): Disabled, 1: Enabled)",
|
||||
"cpuopt_page_tables": "Enable inline page tables optimization (faster guest memory access) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_block_linking": "Enable block linking CPU optimization (reduce block dispatcher use during predictable jumps) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_return_stack_buffer": "Enable return stack buffer CPU optimization (reduce block dispatcher use during predictable returns) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_fast_dispatcher": "Enable fast dispatcher CPU optimization (two-tiered dispatcher architecture) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_context_elimination": "Enable context elimination CPU Optimization (reduce host memory use for guest context) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_const_prop": "Enable constant propagation CPU optimization (basic IR optimization) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_misc_ir": "Enable miscellaneous CPU optimizations (basic IR optimization) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_reduce_misalign_checks": "Enable reduction of memory misalignment checks (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_fastmem": "Enable Host MMU Emulation (faster guest memory access) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_fastmem_exclusives": "Enable Host MMU Emulation for exclusive memory instructions (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_recompile_exclusives": "Enable fallback on failure of fastmem for exclusive memory instructions (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_ignore_memory_aborts": "Enable optimization to ignore invalid memory accesses (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_unsafe_unfuse_fma": "Enable unfuse FMA (improve performance on CPUs without FMA) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_unsafe_reduce_fp_error": "Enable faster FRSQRTE and FRECPE (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_unsafe_ignore_standard_fpcr": "Enable faster ASIMD instructions (32 bits only) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_unsafe_inaccurate_nan": "Enable inaccurate NaN handling (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_unsafe_fastmem_check": "Disable address space checks (64 bits only) (0: Disabled, 1 (default): Enabled)",
|
||||
"cpuopt_unsafe_ignore_global_monitor": "Enable faster exclusive instructions (0: Disabled, 1 (default): Enabled)"
|
||||
],
|
||||
"Renderer": [
|
||||
"backend": "Which backend API to use (0: OpenGL, 1 (default): Vulkan, 2: Null)",
|
||||
"async_presentation": "Enable asynchronous presentation (Vulkan only) (0: Off, 1 (default): On)",
|
||||
"force_max_clock": "Forces GPU to run at max clock (0 (default): Disabled, 1: Enabled)",
|
||||
"debug": "Enable graphics API debugging mode (0 (default): Disabled, 1: Enabled)",
|
||||
"renderer_shader_feedback": "Enable shader feedback (0 (default): Disabled, 1: Enabled)",
|
||||
"nsight_aftermath": "Enable Nsight Aftermath crash dumps (0 (default): Disabled, 1: Enabled)",
|
||||
"disable_shader_loop_safety_checks": "Disable shader loop safety checks (0 (default): Disabled, 1: Enabled)",
|
||||
"vulkan_device": "Which Vulkan physical device to use (default is 0)",
|
||||
"resolution_setup": "Resolution setup (default: 2 (720p/1080p))",
|
||||
"scaling_filter": "Pixel filter for frame up/down-sampling (0: Nearest, 1 (default): Bilinear, 2: Bicubic, etc.)",
|
||||
"anti_aliasing": "Anti-Aliasing (0 (default): None, 1: FXAA)",
|
||||
"fullscreen_mode": "Fullscreen or borderless window mode (0: Borderless, 1: Fullscreen)",
|
||||
"aspect_ratio": "Aspect ratio (0: 16:9, 1: 4:3, 2: 21:9, etc.)",
|
||||
"max_anisotropy": "Anisotropic filtering level (default: 0)",
|
||||
"use_vsync": "Enable VSync (0: Immediate, 1 (default): Mailbox, etc.)",
|
||||
"shader_backend": "Select OpenGL shader backend (0: GLSL, 1 (default): GLASM, 2: SPIR-V)",
|
||||
"use_asynchronous_shaders": "Allow asynchronous shader building (0 (default): Off, 1: On)",
|
||||
"use_reactive_flushing": "Reactive memory flushing (0 (default): Off, 1: On)",
|
||||
"nvdec_emulation": "NVDEC emulation (0: Disabled, 1: CPU Decoding, 2 (default): GPU Decoding)",
|
||||
"accelerate_astc": "Accelerate ASTC texture decoding (0 (default): Off, 1: On)",
|
||||
"use_speed_limit": "Limit emulation speed (0: Off, 1 (default): On)",
|
||||
"speed_limit": "Limit game speed to a percentage of target (default: 100%)",
|
||||
"use_disk_shader_cache": "Use disk-based shader cache (0: Off, 1 (default): On)",
|
||||
"gpu_accuracy": "GPU accuracy level (0 (default): Normal, 1: High, 2: Extreme)",
|
||||
"use_asynchronous_gpu_emulation": "Enable asynchronous GPU emulation (0: Off, 1 (default): On)",
|
||||
"use_fast_gpu_time": "Enable fast GPU time reporting (0: Off, 1 (default): On)",
|
||||
"use_pessimistic_flushes": "Force flush unmodified buffers (0 (default): Off, 1: On)",
|
||||
"use_caches_gc": "Use garbage collection for GPU caches (0 (default): Off, 1: On)",
|
||||
"bg_red": "Clear color for red (0-255, default: 0)",
|
||||
"bg_blue": "Clear color for blue (0-255, default: 0)",
|
||||
"bg_green": "Clear color for green (0-255, default: 0)"
|
||||
],
|
||||
"Audio": [
|
||||
"output_engine": "Audio output engine (default: auto)",
|
||||
"output_device": "Audio device (default: auto)",
|
||||
"volume": "Output volume (default: 100%)"
|
||||
],
|
||||
"Data Storage": [
|
||||
"use_virtual_sd": "Enable virtual SD card (1: Yes, 0 (default): No)",
|
||||
"gamecard_inserted": "Enable gamecard emulation (1: Yes, 0 (default): No)",
|
||||
"gamecard_current_game": "Emulate gamecard as current game (1: Yes, 0 (default): No)",
|
||||
"gamecard_path": "Path to XCI file for gamecard emulation"
|
||||
],
|
||||
"System": [
|
||||
"use_docked_mode": "Use docked mode (1: Yes, 0 (default): No)",
|
||||
"rng_seed_enabled": "Enable RNG seed",
|
||||
"rng_seed": "Seed for RNG generator",
|
||||
"custom_rtc_enabled": "Enable custom RTC time override",
|
||||
"custom_rtc": "Override time in seconds since 1970",
|
||||
"language_index": "System language index (0: Japanese, 1: English, etc.)",
|
||||
"region_index": "System region (default: -1, 0: Japan, 1: USA, etc.)",
|
||||
"time_zone_index": "Time zone index (default: 0)",
|
||||
"sound_index": "Sound output mode (0: Mono, 1 (default): Stereo, 2: Surround)"
|
||||
],
|
||||
"Miscellaneous": [
|
||||
"log_filter": "Filter log messages (e.g., *:Trace)"
|
||||
],
|
||||
"Debugging": [
|
||||
"record_frame_times": "Record frame time data",
|
||||
"dump_exefs": "Dump ExeFS while loading games",
|
||||
"dump_nso": "Dump all NSOs while loading",
|
||||
"enable_fs_access_log": "Save filesystem access log",
|
||||
"reporting_services": "Enable verbose reporting services",
|
||||
"quest_flag": "Set emulation console to Kiosk Mode (false: Retail/Normal, true: Kiosk)",
|
||||
"use_debug_asserts": "Enable debug asserts",
|
||||
"use_auto_stub": "Automatically stub unimplemented HLE service calls",
|
||||
"disable_macro_jit": "Disable macro JIT compiler",
|
||||
"use_gdbstub": "Enable GDB remote debugging",
|
||||
"gdbstub_port": "GDB debugging port (default: 1234)",
|
||||
"wait_for_gdb": "Wait for debugger on launch"
|
||||
]
|
||||
]
|
||||
*/
|
||||
|
||||
|
||||
func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(id)
|
||||
hasher.combine(developer)
|
||||
@ -36,3 +210,17 @@ struct PomeloGame : Comparable, Hashable, Identifiable {
|
||||
}
|
||||
|
||||
|
||||
struct Setting {
|
||||
var category: String
|
||||
var name: String
|
||||
var description: String
|
||||
var value: Any
|
||||
var type: SettingType
|
||||
var range: ClosedRange<Double>? // Only for slider values
|
||||
}
|
||||
|
||||
enum SettingType {
|
||||
case toggle
|
||||
case slider
|
||||
case textField
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ func sendrequestsidejit(url: String, completion: @escaping (Result<Void, SideJIT
|
||||
let url = URL(string: url)!
|
||||
|
||||
let task = URLSession.shared.dataTask(with: url) {(data, response, error) in
|
||||
if let error = error {
|
||||
if error != nil {
|
||||
completion(.failure(.errorConnecting))
|
||||
return
|
||||
}
|
||||
@ -43,7 +43,7 @@ func sendrefresh(url: String, completion: @escaping (Result<Void, SideJITServerE
|
||||
let url = URL(string: url)!
|
||||
|
||||
let task = URLSession.shared.dataTask(with: url) {(data, response, error) in
|
||||
if let error = error {
|
||||
if error != nil {
|
||||
completion(.failure(.errorConnecting))
|
||||
return
|
||||
}
|
||||
|
@ -56,11 +56,13 @@ struct GameIconView: View {
|
||||
)
|
||||
.onTapGesture {
|
||||
if isSelected {
|
||||
Haptics.shared.notify(.success)
|
||||
startgame = true
|
||||
print(isSelected)
|
||||
}
|
||||
|
||||
if !isSelected {
|
||||
Haptics.shared.play(.rigid)
|
||||
selectedGame = game
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,7 @@ struct GameGridView: View {
|
||||
|
||||
var body: some View {
|
||||
let filteredGames = core.games.filter { game in
|
||||
guard let PomeloGame = game as? PomeloGame else { return false }
|
||||
return searchText.isEmpty || PomeloGame.title.localizedCaseInsensitiveContains(searchText)
|
||||
return searchText.isEmpty || game.title.localizedCaseInsensitiveContains(searchText)
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
|
@ -109,7 +109,6 @@ struct GameListView: View {
|
||||
let title = core.root.appendingPathComponent("keys").appendingPathComponent("title.keys")
|
||||
let prod = core.root.appendingPathComponent("keys").appendingPathComponent("prod.keys")
|
||||
let fileManager = FileManager.default
|
||||
let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0]
|
||||
|
||||
if fileManager.fileExists(atPath: prod.path) {
|
||||
doesprodexist = true
|
||||
|
@ -64,7 +64,6 @@ struct LibraryView: View {
|
||||
core.refreshcore(core: &core)
|
||||
|
||||
if let documentsDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first {
|
||||
let romsFolderURL = documentsDirectory.appendingPathComponent("roms")
|
||||
|
||||
do {
|
||||
core = Core(games: [], root: documentsDirectory)
|
||||
|
@ -16,6 +16,19 @@ func --(lhs: Bool, rhs: Bool) -> Bool {
|
||||
@main
|
||||
struct PomeloApp: App {
|
||||
|
||||
init() {
|
||||
|
||||
// setenv("MVK_DEBUG", "1", 1)
|
||||
|
||||
// setenv("MVK_CONFIG_TRACE_VULKAN_CALLS", "1", 1)
|
||||
|
||||
// setenv("MVK_CONFIG_LOG_LEVEL", "4", 1)
|
||||
|
||||
setenv("MVK_USE_METAL_PRIVATE_API", "1", 1)
|
||||
|
||||
setenv("MVK_CONFIG_USE_METAL_PRIVATE_API", "1", 1)
|
||||
}
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
if #available(iOS 16, *) {
|
||||
|
@ -13,7 +13,6 @@ struct AdvancedSettingsView: View {
|
||||
@AppStorage("icloudsaves2") var icloudsaves: Bool = false
|
||||
@AppStorage("isfullscreen") var isFullScreen: Bool = false
|
||||
@AppStorage("169fullscreen") var sixteenbynineaspect: Bool = false
|
||||
@AppStorage("exitgame") var exitgame: Bool = false
|
||||
@AppStorage("ClearBackingRegion") var kpagetable: Bool = false
|
||||
@AppStorage("WaitingforJIT") var waitingJIT: Bool = false
|
||||
@AppStorage("cangetfullpath") var canGetFullPath: Bool = false
|
||||
@ -22,9 +21,8 @@ struct AdvancedSettingsView: View {
|
||||
@AppStorage("showMetalHUD") var showMetalHUD: Bool = false
|
||||
|
||||
@AppStorage("canShowMetalHUD") var canShowMetalHUD: Bool = false
|
||||
|
||||
@AppStorage("ShowMenuButton") private var ShowMenuButton: Bool = true
|
||||
@AppStorage("hideLastNameTop") var hideLastName: Bool = false
|
||||
@AppStorage("deviceOwnerLastName") var deviceOwnerLastName: String?
|
||||
@State var isshowing = false
|
||||
|
||||
var body: some View {
|
||||
@ -39,7 +37,7 @@ struct AdvancedSettingsView: View {
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
Text("This is unstable and can lead to crashes. Use at your own risk.")
|
||||
Text("Makes the games stretch to fill the screen.")
|
||||
.padding(.bottom)
|
||||
.font(.footnote)
|
||||
.foregroundColor(.gray)
|
||||
@ -54,7 +52,7 @@ struct AdvancedSettingsView: View {
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
Text("This is unstable and can lead to crashes. Use at your own risk.")
|
||||
Text("Keeps the games in a 16:9 aspect ratio but fills the screen.")
|
||||
.padding(.bottom)
|
||||
.font(.footnote)
|
||||
.foregroundColor(.gray)
|
||||
@ -100,6 +98,7 @@ struct AdvancedSettingsView: View {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if deviceOwnerLastName != nil {
|
||||
Rectangle()
|
||||
.fill(Color(uiColor: UIColor.secondarySystemBackground))
|
||||
@ -117,7 +116,6 @@ struct AdvancedSettingsView: View {
|
||||
.foregroundColor(.gray)
|
||||
}
|
||||
|
||||
/*
|
||||
Rectangle()
|
||||
.fill(Color(uiColor: UIColor.secondarySystemBackground))
|
||||
.cornerRadius(10)
|
||||
@ -141,20 +139,25 @@ struct AdvancedSettingsView: View {
|
||||
.foregroundColor(.gray)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
Rectangle()
|
||||
.fill(Color(uiColor: UIColor.secondarySystemBackground))
|
||||
.cornerRadius(10)
|
||||
.frame(width: .infinity, height: 50)
|
||||
.overlay() {
|
||||
HStack {
|
||||
Toggle("Exit Game Button", isOn: $exitgame)
|
||||
Toggle("Menu Button", isOn: $ShowMenuButton)
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
Text("This is very unstable and can lead to game freezing and overall bad preformance after you exit a game")
|
||||
Text("The exiting game feature in the menu is very unstable and can cause crashes and other issues when exiting games")
|
||||
.padding(.bottom)
|
||||
.font(.footnote)
|
||||
.foregroundColor(.gray)
|
||||
|
||||
|
||||
Rectangle()
|
||||
.fill(Color(uiColor: UIColor.secondarySystemBackground))
|
||||
.cornerRadius(10)
|
||||
|
@ -11,11 +11,12 @@ import SwiftUI
|
||||
struct AppIcon: Identifiable {
|
||||
let id = UUID()
|
||||
let name: String
|
||||
let iconName: String?
|
||||
var iconName: String?
|
||||
}
|
||||
|
||||
struct AppIconSwitcherView: View {
|
||||
@State private var selectedIcon: String?
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
|
||||
let appIcons: [AppIcon] = [
|
||||
AppIcon(name: "Default", iconName: nil),
|
||||
@ -59,17 +60,35 @@ struct AppIconSwitcherView: View {
|
||||
}
|
||||
|
||||
struct IconRow: View {
|
||||
let icon: AppIcon
|
||||
var icon: AppIcon
|
||||
let isSelected: Bool
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
|
||||
var issdark: Bool {
|
||||
if colorScheme == .dark, (icon.iconName ?? "") == "secondary" {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
|
||||
if let iconImage = getIconImage(for: icon.iconName) {
|
||||
Image(uiImage: iconImage)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 60, height: 60)
|
||||
.cornerRadius(12)
|
||||
if let iconImage = getIconImage(for: "secondary-dark"), issdark {
|
||||
Image(uiImage: iconImage)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 60, height: 60)
|
||||
.cornerRadius(12)
|
||||
} else {
|
||||
Image(uiImage: iconImage)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 60, height: 60)
|
||||
.cornerRadius(12)
|
||||
}
|
||||
} else {
|
||||
// Fallback to app's primary icon
|
||||
if let primaryIcon = Bundle.main.icon {
|
||||
|
@ -17,6 +17,10 @@ struct SettingsView: View {
|
||||
@AppStorage("useTrollStore") var useTrollStore: Bool = false
|
||||
@AppStorage("deviceOwnerID") var deviceOwnerID: String?
|
||||
|
||||
@AppStorage("showfunnibackground") private var showbackground: Bool = false
|
||||
|
||||
@State var timestapped: Int = 0
|
||||
|
||||
@State var isshown: Bool = true
|
||||
|
||||
var body: some View {
|
||||
@ -94,23 +98,23 @@ struct SettingsView: View {
|
||||
}
|
||||
|
||||
/*
|
||||
NavigationLink(destination: AppIconView()) {
|
||||
Rectangle()
|
||||
.fill(Color(uiColor: UIColor.secondarySystemBackground)) // Set the fill color (optional)
|
||||
.cornerRadius(10) // Apply rounded corners
|
||||
.frame(width: .infinity, height: 50) // Set the desired dimensions
|
||||
.overlay() {
|
||||
HStack {
|
||||
Text("App Icon")
|
||||
.foregroundColor(.primary)
|
||||
.padding()
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
NavigationLink(destination: AppIconView()) {
|
||||
Rectangle()
|
||||
.fill(Color(uiColor: UIColor.secondarySystemBackground)) // Set the fill color (optional)
|
||||
.cornerRadius(10) // Apply rounded corners
|
||||
.frame(width: .infinity, height: 50) // Set the desired dimensions
|
||||
.overlay() {
|
||||
HStack {
|
||||
Text("App Icon")
|
||||
.foregroundColor(.primary)
|
||||
.padding()
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
*/
|
||||
|
||||
|
||||
// NavigationLink(
|
||||
NavigationLink(destination: AdvancedSettingsView()) {
|
||||
Rectangle()
|
||||
@ -125,7 +129,7 @@ struct SettingsView: View {
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.padding()
|
||||
|
||||
@ -143,14 +147,37 @@ struct SettingsView: View {
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.padding()
|
||||
|
||||
if timestapped >= 10 || showbackground {
|
||||
Rectangle()
|
||||
.fill(Color(uiColor: UIColor.secondarySystemBackground))
|
||||
.cornerRadius(10)
|
||||
.frame(width: .infinity, height: 50)
|
||||
.overlay() {
|
||||
HStack {
|
||||
Toggle("Enable Apple Inteligence Background", isOn: $showbackground)
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.padding(.horizontal)
|
||||
Text("This is a secret, cool. (only works on iOS 18+)")
|
||||
.padding(.bottom)
|
||||
.font(.footnote)
|
||||
.foregroundColor(.gray)
|
||||
.padding(.horizontal)
|
||||
|
||||
}
|
||||
|
||||
HStack(alignment: .center) {
|
||||
Spacer()
|
||||
Text("By \(getDeveloperNames())")
|
||||
.font(.caption2)
|
||||
.onTapGesture {
|
||||
timestapped += 1
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ public:
|
||||
|
||||
/// Returns true if the device supports VK_KHR_push_descriptor.
|
||||
bool IsKhrPushDescriptorSupported() const {
|
||||
return extensions.push_descriptor;
|
||||
return false; // extensions.push_descriptor;
|
||||
}
|
||||
|
||||
/// Returns true if VK_KHR_pipeline_executable_properties is enabled.
|
||||
@ -651,7 +651,7 @@ public:
|
||||
}
|
||||
|
||||
bool HasNullDescriptor() const {
|
||||
return features.robustness2.nullDescriptor;
|
||||
return false; // fxeatures.robustness2.nullDescriptor;
|
||||
}
|
||||
|
||||
bool HasExactDepthBiasControl() const {
|
||||
|
@ -98,9 +98,6 @@ Buffer::Buffer(BufferCacheRuntime& runtime, DAddr cpu_addr_, u64 size_bytes_)
|
||||
|
||||
VkBufferView Buffer::View(u32 offset, u32 size, VideoCore::Surface::PixelFormat format) {
|
||||
if (!device) {
|
||||
// Null buffer supported, return a null descriptor
|
||||
return VK_NULL_HANDLE;
|
||||
} else if (is_null) {
|
||||
// Null buffer not supported, adjust offset and size
|
||||
offset = 0;
|
||||
size = 0;
|
||||
|