Commit Graph

23949 Commits

Author SHA1 Message Date
spectranator
59bda52beb Upgrade to Qt 6 (#130)
Why? Open Source Qt 5 will stop receiving updates rather sooner than later so it's worth switching to Qt 6 to remain compatible with modern systems.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/130
2025-07-02 20:27:29 +00:00
spectranator
634acab40b Update some Android dependencies and fix build by making boost-process optional (#120)
Based on #119

Co-authored-by: Ramiro <ramiro.depaoli@gmail.com>
Co-authored-by: spectranator <spectranator@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/120
2025-04-16 19:47:40 +00:00
spectranator
f7849077e1 Removed Git SCM string anonymization as it's proven quite useless and hindering in understanding bug report 2025-04-13 16:10:03 +02:00
spectranator
35f4aa964f Fixed about dialog window being too small for content 2025-04-13 16:01:45 +02:00
spectranator
5b478bdb9c Link against all required Boost components 2025-04-13 13:05:27 +02:00
spectranator
335570dfd3 In containerized AppImage build use Clang and allow thin/fat LTO for smaller and more optimized AppImages 2025-04-12 21:18:30 +02:00
spectranator
a640bbee41 Allow Yuzu to be built using Clang-CL for better compiler optimizations for Windows
Also updates Boost to 1.88.0
2025-04-12 18:46:13 +02:00
spectranator
709f70a3b2 Fix shader compile error if source directory path contains spaces 2025-04-12 12:28:22 +00:00
spectranator
977ed0063a Implemented dependency collection via CPM.cmake 2025-04-12 04:10:29 +02:00
Zephyron
8f1b45003b service/vi: Improve OpenDisplay validation
Updates the OpenDisplay function in IApplicationDisplayService to properly
validate display names. Instead of only accepting "Default", now validates
against all known valid display names: "Default", "External", "Edid",
"Internal", and "Null".

- Changes log level from WARNING to DEBUG since this is no longer stubbed
- Adds proper validation for all valid display names
- Returns ResultOperationFailed for invalid display names
- Improves logging by including the requested display name
2025-04-06 23:41:57 +02:00
Zephyron
e7e5906892 vulkan: Improve memory allocation robustness
Enhances the Vulkan memory allocator with better OOM handling and memory
alignment:

* Add memory recovery by cleaning up empty allocations before failing
* Implement proper fallback to non-device-local memory
* Simplify memory alignment handling for different vendors
* Add better error logging for allocation failures
* Add IsEmpty() helper to track unused allocations
* Fix alignment requirements for Adreno (4KB) vs other vendors

These changes improve the robustness of memory allocation, particularly
in low-memory situations, and streamline vendor-specific alignment
requirements.
2025-04-06 23:08:13 +02:00
EmulationEnjoyer
f8ae0e4f2a Register ssl:s service to fix game hangs (#109)
Fixes an infinite timeout hanging issue when booting "Xenoblade Chronicles X: Definitive Edition"
(may apply to other titles as well)

>  Service.SM <Info> core\hle\service\sm\sm.cpp:GetServiceImpl:187: Waiting for service ssl:s to become available

ref: 51800e249b

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/109
Co-authored-by: EmulationEnjoyer <emulationenjoyer@noreply.localhost>
Co-committed-by: EmulationEnjoyer <emulationenjoyer@noreply.localhost>
2025-04-06 11:52:50 +00:00
EmulationEnjoyer
3f6a2bac86 Implement HID function stub "SetGestureOutputRanges" (#105)
Add function stub for "SetGestureOutputRanges" in HID service

Fixes userspace panic when booting Donkey Kong Country Returns HD:

> Debug <Critical> core\hle\service\service.cpp:operator ():78: Assertion Failed!
Unknown / unimplemented function '92(<unknown>)': port='hid' cmd_buf={[0]=0x6, [1]=0x8000000C, [2]=0x1, [3]=0x0, [4]=0x4F434653, [5]=0x0, [6]=0x0, [7]=0x0, [8]=0x49434653}
> Service.AM <Info> core\hle\service\am\service\application_functions.cpp:SetTerminateResult:187: (STUBBED) called, result=0x1a80a (2010-0212)
> Debug.Emulated <Critical> core\hle\kernel\svc\svc_exception.cpp:Break:52: Userspace PANIC! info1=0x0000001086D02C4C, info2=0x0000000000000004
> Debug.Emulated <Critical> core\hle\kernel\svc\svc_exception.cpp:operator ():33: debug_buffer_err_code=1A80A
> Debug.Emulated <Critical> core\hle\kernel\svc\svc_exception.cpp:Break:102: Emulated program broke execution! reason=0x0000000000000000, info1=0x0000001086D02C4C, info2=0x0000000000000004

ref: 132077e18f

![](https://i.imgur.com/hbBnlYs.png)

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/105
Co-authored-by: EmulationEnjoyer <emulationenjoyer@noreply.localhost>
Co-committed-by: EmulationEnjoyer <emulationenjoyer@noreply.localhost>
2025-01-22 20:42:58 +00:00
Laconix
bc4239dd9f Turn off predictive back gesture to fix hardware back button not working in android 13 or higher 2025-01-10 06:17:51 +00:00
FireBurn
20ac5cd42b Include memory header
This stops build failures for missing std::shared_ptr which is in multiple files

Signed-off-by: FireBurn <mike@fireburn.co.uk>
2025-01-10 06:16:46 +00:00
Zuckerwatte1
86f6184375 Add 12gb DRAM option (#90)
This adds the option to allow the emulator to use 12gb of RAM for something like really big texture packs.

Co-authored-by: smiRaphi <neogt404@gmail.com>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/90
Co-authored-by: Zuckerwatte1 <zuckerwatte1@noreply.localhost>
Co-committed-by: Zuckerwatte1 <zuckerwatte1@noreply.localhost>
2024-12-15 15:14:54 +00:00
EmulationEnjoyer
bb142c9657 shader/recompiler: Revert NVN storage buffer bias range
- Return to original NVN bias values which better cover the full range of storage buffer accesses:
- offset_begin: 0x110 -> 0x100
- offset_end: 0x610 -> 0x700

The wider range ensures we catch all valid storage buffer accesses
while maintaining the same alignment requirements.

ref: 2564e721df
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
266eb0d318 arm: Skip duplicate consecutive addresses in backtrace output
ref: aa56430f2a
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
d231c26e22 chore(HLE): Update HLE API version constants
- Updated Horizon OS version to 19.0.1 and NintendoSDK version to 1.0. Adjusted `VERSION_HASH`, `DISPLAY_VERSION`, and `DISPLAY_TITLE` to match the new firmware versions.

ref: fcb6444037
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
247f61e1f9 perf(VideoCore): Refactor DispatchIndirect
- Added automatic safe or unsafe processing for better emulation accuracy.

ref: 8cae0310e3
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
154aab7c4b feat(shader): implement geometry shader invocation info
- Update EmitInvocationInfo in SPIRV backend to handle geometry shader stage

ref: 1266fad681 (diff-4cbf73a98ed4ad649a4a6f38b569bc31fcf68cf7)
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
56f062ac4d core: Add new error modules to ErrorModule enum
- Add support for homebrew error modules to improve error handling
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
05ccbaa8fa Update src/audio_core/common/feature_support.h
Updated AudioCore Revision from 11 -> 13
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
95ef5431c5 feat: update HLE API version constants to Horizon OS 19.0.0
- Updated Horizon OS version constants from 12.1.0 to 19.0.0.
- Changed the version hash from `76b10c2dab7d3aa73fc162f8dff1655e6a21caf4` to `52971eebbba7ab9e6e23d73753aa63e0c3794b16`.
- Updated `DISPLAY_TITLE` and `DISPLAY_VERSION` to reflect the new firmware version "NintendoSDK Firmware for NX 19.0.0-4.0".
- Incremented Atmosphere release version constants to 1.8.0.

ref: 3276bf8780
2024-11-15 12:16:49 +00:00
anon
14d40552e5 dma_pusher.cpp: remove now unused variable that breaks the android build (#76)
Completes http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/71

Discovered when building android version on debian via command line.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/76
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-11-03 12:34:19 +00:00
lui
9efce71072 externals: update fmt to 11.0.2 and vcpkg to 2024.09.30 (#68)
Updated to fmt 11 with the required source changes for it to work.

Also updated vcpkg for this, and as an added benefit it fixes the `Unable to find a valid Visual Studio instance` error, and the VS 2019 build tools are no longer required. Just make sure to delete the existing downloaded vcpkg tool and binaries in `externals/vcpkg` if you have compiled before, or else it will continue to use the old version and give the error.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/68
Co-authored-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Co-committed-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
2024-11-03 12:25:47 +00:00
cow
85dc40ad23 kepler_compute: use safe memory read
If unsafe read is done there can sometimes be corrupt data in the
KeplerCompute::ProcessLaunch qmd structure.

Fixes GPU crashes in 'Princess Peach: Showtime!' when using vulkan
renderer. Requires using "Accuracy Level High" (crashes will still
happen if using "Normal").

Tested on Radeon 6750XT, Linux 6.11.2, Mesa 24.2.5 (RADV driver).

Unsafe read was introduced in 115792158d
"VideoCore: Implement DispatchIndirect"

How did I debug this:
- Used VK_LAYER_KHRONOS_validation which found invalid vkCmdDispatch
  (along with a lot of other noise!)
- Instrumented all calls to vulkan Dispatch(), set breakpoint when
  grid_dim_x > 1024 (an obviously invalid value). Found dispatch came
  from RasterizerVulkan::DispatchCompute().
- Commented out DispatchCompute() entirely, game runs with no crashes
  but some graphics effects are missing.
- Keep going one layer up, observe corrupted `launch_description` in
  KeplerCompute::ProcessLaunch()
- Attempted safe ReadBlock (`which = VideoCommon::CacheType::All`)
  instead of ReadBlockUnsafe in KeplerCompute::ProcessLaunch(), did not
  help
- Go one layer up to DmaPusher. Switch to safe_process(). No more
  corrupt `launch_description`.
2024-10-22 17:48:59 +00:00
anon
4259889895 Remove "/DEBUG" flag from CMAKE_EXE_LINKER_FLAGS_RELEASE
lol, has the emulator been running in a slower debug mode, even in release builds, ever since it was yuzu? This has been there since 4176. I was wondering why *.pdb debugging files still get generated.
2024-10-13 04:29:29 +00:00
lui
a9b7cae667 capitalize 'Open Current Mirror Repo' to match other menu options 2024-10-12 23:35:58 +00:00
lui
6d2368b07b configuration: break up tooltip for 'VRAM Usage Mode' into multiple lines 2024-10-12 23:35:58 +00:00
lui
f52a2c5d99 configuration: increase default height of per-game configuration window 2024-10-12 23:35:58 +00:00
lui
11cd91ea01 configure_graphics: use stylesheet for background button color
Keeps things consistent with the color picker from d6ca4f11c1 and joycon color picker buttons
2024-10-12 23:35:58 +00:00
lui
1a0d98f984 renderer: add area sampling scaling method (#57)
Adds Area Sampling to the list of scaling options. Works well to achieve a high-quality, smooth super-sampling effect. Dolphin has had this for a while, and now Ryujinx has recently added it too, so I decided to port it.

Not sure if adding the extra uniform to the OpenGL WindowAdaptPass was a good idea or not, or if using the push constants under Vulkan was either, but I wasn't sure about the best way to get the window size for use in the shader, and other scaling methods still work fine. Implementation seems to work fine under both Vulkan and OpenGL, but might still need some minor tweaks to the shader. Should definitely do some testing before merging, I have tested on an Nvidia RTX 3080 under Windows.

Adapted from these two PRs:
https://github.com/Ryujinx/Ryujinx/pull/7304
https://github.com/dolphin-emu/dolphin/pull/11999

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/57
Co-authored-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Co-committed-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
2024-10-03 13:25:58 +00:00
lui
d6ca4f11c1 profile_manager: Implement firmware avatar selector (#56)
Adds an option to set a user's profile image from the avatars in the firmware. Background color can be changed with a color picker. Also modifies profile image saving to account for this, and as a result images are now saved as JPEG with 100% quality. Any PNG, JPEG, or BMP can now also be used in the image file picker instead of just JPEG.

Also of note: I am not a C/C++ developer so please let me know if anything should be changed. Used ryujinx's implementation and other parts of the yuzu codebase for reference.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/56
Co-authored-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Co-committed-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
2024-10-03 12:50:46 +00:00
echosys
ab4c093976 Fix Android crash caused by incorrect type in progress dialog callbacks (#58)
Bug discovered via an incomplete fix in Sudachi.

Some Progress Dialog callbacks pass the wrong type (Double instead of Long) from C++ to Java code causing a crash at runtime.
To fix this a new function is implemented to convert to a Java Long and that is used instead of the function that converts to a Double.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/58
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-10-03 12:08:28 +00:00
echosys
e157415bd9 Update Android app dependencies (#52)
Update the dependencies of the Android app (used libraries and SDK). The Android SDK was not updated to the latest version, because then the build fails.

The `gradle-wrapper.jar` (the only binary blob touched in this PR) can be verified by checking against the official checksums [here](gradle-wrapper.jar).

Co-authored-by: spectranator <spectranator@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/52
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-08-24 16:53:35 +00:00
echosys
587825f60a Fix x86_64 build for Android (#49)
Fixes x86_64 builds for Android by stubbing a function that calls into libadrenotools to query GPU driver information. libadrenotools is only available for arm64.
The function should not be called anyways, as the menu that would display the information is disabled on unsupported devices.

To enable x86_64 for building change the line `abiFilters += listOf("arm64-v8a")` in `src/android/app/build.gradle.kts` to `abiFilters += listOf("arm64-v8a", "x86_64")`.
I did not do this by default as it significantly increases the build time (the native part needs to be build once for each architecture) and increases the app size (this is less of a concern as games are already significantly larger).
It might allow usage on Chromebooks (the internet tells me those run on x86_64) and some few Android devices. The main advantage I see is for development of the app itself, as it allows running it in waydroid for local testing.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/49
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-08-11 12:11:13 +00:00
anon
0719273fed Reorder configuration tabs (#32)
Co-authored-by: spectranator <spectranator@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/32
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-08-10 13:28:05 +00:00
echosys
cd40133aa4 Be more explicit on struct init (#46)
Older versions of gcc (gcc-11 which is used in the build guide) seem to struggle with these two struct initializations (if I understand this correctly it is using "designated initialization" which is new in C++20) leading to compile errors (see #42).
This replaces those two initializations with a more explicit one that also compiles on gcc-11.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/46
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-08-10 12:53:04 +00:00
anon
c8997e4ab5 Remove elements for removed buttons in web config (#31)
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/31
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-07-26 22:15:01 +00:00
anon
f38060714a Better text spacing in about dialog (partial #22) 2024-07-26 17:51:02 +02:00
spectranator
c92b9f9024 Automatically generate token (#22/#28)
Co-authored-by: anon <anon@noreply.localhost>
Co-authored-by: spectranator <spectranator@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/22
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/28
2024-07-26 17:40:08 +02:00
anon
a1c2940b31 option to skip compiling the -cmd executable (#26)
There's already a `-DYUZU_ROOM` flag that can be set to OFF to skip compiling that executable.

This adds a `-DYUZU_CMD` flag that is ON by default, but can be set to OFF to also skip compiling the yuzu-cmd executable.

Setting both to OFF saves **_a lot_** of compiling time if you don't ever use either the yuzu-room or yuzu-cmd exes.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/26
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-07-24 23:24:18 +00:00
echosys
a41955cc58 Remove early access Android app variant (#27)
Removes the early access Android app variant from the build config and removes the get early access button from the settings tab.

I also tried to remove the code for the variant (different logo + colors) and the code for the button, but I am no Android developer so I might have missed some stuff.
Additionally I did not touch the translation files.

Essentially this gets rid of the now useless fancy button and improves build times as it only needs to build one apk now.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/27

Spec's note:
Whatever there's left can still be removed at a later point.
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-07-24 23:05:03 +00:00
echosys
7e27e6476d Add option to only optimize SPIRV during load (#13)
Adds a new option "On Load" to the "Optimize SPIRV output" option that turns on optimizations during the loading of the shader cache from disk, but turns it off after that.
The previous checkbox states have been named "Never" for unchecked and "Always" for checked.

The idea is that once the shader cache has most of the shaders in a game cached they can be optimized during initial game startup (where a performance hit matters less) and the few shaders that get compiled during runtime are not optimized to reduce performance hits.

Most of the commit is adding the setting to the Android app, the main logic is in the `gl_shader_cache.cpp` and `vk_pipeline_cache.cpp` files.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/13
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-07-19 19:14:19 +00:00
spectranator
e3ea6f2059 Revert "Added abgr8 srgb to d24s8 conversion shader"
This reverts commit e8f43b7078.
2024-07-06 22:39:54 +02:00
mateomaui
93c9c33b9f revert changes introduced in EA3835 to audio sink auto-select, fixing stuttering in Diablo 3, etc (#3)
Reverts most of this commit (but not all, some parts are still needed, or were reverted already in later EAs): 39c8ddcda2 or 39c8ddcda2

Above commit to the audio sink was first included in EA-3835, changing the way an audio engine is auto-selected by lowest latency... but still doesn't work very well, often using cubeb when it should use SDL.

A side effect of this was that microstuttering was introduced in a few titles. In Diablo 3, the main player character appears to teleport forward a few steps, every couple of steps. It's a consistent, constant stutter when simply walking forward. Occurs for both SDL and cubeb, with cubeb noticeably worse.

3834 and 3833 didn't have this issue with SDL, and the commit above was the bulk of the changes for 3835. Reverting those changes back to the 3833 version has fixed the stutter (for me at least) in D3 as long as SDL is selected (cubeb still stutters). The only observed negative is the audio engine may need to be manually selected in global settings instead of using auto.

Also seems to have fixed intermittent microstutters in TOTK and RDR. Unaware of other titles this may fix, or possibly create a problem for (though creating issues probably is not likely.)
2024-07-06 20:38:09 +00:00
Jarrod Norwell
e8f43b7078 Added abgr8 srgb to d24s8 conversion shader 2024-07-06 20:38:09 +00:00
spectranator
a9f6342ea4 Added ILibraryAppletSelfAccessor::UnpopInData stub 2024-06-30 17:55:17 +02:00
Reg Tiangha
c432641245 MacOS: Fix Debugger namespace naming confilct 2024-06-30 15:18:24 +00:00