Commit graph

27175 commits

Author SHA1 Message Date
EmulationEnjoyer
a5a7cb8a24 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
2025-04-19 17:56:48 -03:00
EmulationEnjoyer
cb135ba86f 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
2025-04-19 17:56:48 -03:00
EmulationEnjoyer
e6d0c5ea42 arm: Skip duplicate consecutive addresses in backtrace output
ref: aa56430f2a
2025-04-19 17:56:48 -03:00
Zephyron
cf1bcb02c5 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-19 17:19:38 -03:00
Zephyron
728de0406e 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-19 17:19:16 -03:00
MrPurple666
bf7502e439 Update Vulkan submodules 2025-04-19 17:17:13 -03:00
MrPurple666
19d28cf97b Fix linux build 2025-04-15 01:03:41 -03:00
Pavel Barabanov
ee03ac227d Fixes the launch of some games on firmware versions 18 and above. 2025-04-15 05:59:18 +03:00
MrPurple666
909a94783c fixes out_audio_controller build error 2025-04-14 12:23:30 -03:00
Zephyron
389327d3f0 vulkan: Add Samsung driver workarounds
Add workarounds for Samsung Xclipse GPUs:

- Disable extendedDynamicState3ColorBlendEquation as it is broken in Samsung
  drivers, similar to AMD drivers
- Add Samsung's proprietary driver to the validated driver list for clock
  boosting
- Fix log message to indicate both AMD and Samsung drivers have broken
  color blend equation support

Remove stray logical OR operator from validated_driver condition.
2025-04-14 12:17:19 -03:00
Zephyron
cae9d9b9e8 service/audio: implement Unknown5000 and add debug commands
- Add Unknown5000 implementation to create duplicate controller interface
- Add new debug-related command handlers:
  * OverrideDefaultTargetForDebug (50001)
  * SetForceOverrideExternalDeviceNameForDebug (50003)
  * ClearForceOverrideExternalDeviceNameForDebug (50004)
- Add proper debug logging for interface creation
- Update header with new function declaration
- Fix missing commas in function registration array

These changes improve the audio controller implementation by
adding support for interface duplication and debug override
functionality. The implementation maintains proper interface
lifetime management using SharedFrom.
2025-04-14 12:15:52 -03:00
Pavel Barabanov
1bd86b08f2 Qlauncher firmware 19 2025-04-14 12:10:33 -03:00
d87ba21d05 Service: am: enhance UnpopInData, GetHdcpAuthenticationState and GetHdcpAuthenticationStateChangeEvent
Thanks to Sudachi and Torzu for some help and referance.
2025-04-14 12:10:06 -03:00
MrPurple666
604e700a19 fix overlay options with pavel's changes and add a skipping information 2025-04-14 04:40:40 -03:00
MrPurple666
a98ac705e4 Merge branch 'pr-25' into purple 2025-04-14 04:29:24 -03:00
Pavel Barabanov
b43dfff894 Eden’s Veil setting 2025-04-14 03:50:37 -03:00
MrPurple666
73d973dad6 Based on CamilleLaVey code, fix MSAA and Depth Stencil 2025-04-13 17:19:59 -03:00
darktux
eb536ef8a8 Return correct amount of values from IFriendService::GetReceivedFriendRequestCount 2025-04-13 15:39:17 -03:00
darktux
26eece092f Fix NROs crashing and loading infinitely (#3)
Commit from Suyu, looks like Yuzu devs forgot to initialize memory here.

Comment from darktux: I've changed the use of memset to std::fill.

Co-authored-by: Belal Ashraf <nullequal@noreply.localhost>
Reviewed-on: http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/darktux/torzu/pulls/3
Co-authored-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
Co-committed-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
2025-04-13 15:39:03 -03:00
f9057431ee Update README.md
(again)
2025-04-13 01:35:08 -03:00
67599f7d01 Update README.md 2025-04-13 01:35:08 -03:00
cb5c52f208 switch submodules to our forks
Signed-off-by: swurl <swurl@swurl.xyz>
2025-04-13 01:34:19 -03:00
Briar
fe51be43c1 android: Enhance FPS Overlay with more customizable options
- Now the fps follows theme color set in settings
- Added the ability to toggle stats on and off depending on user preference
- Now you are able to change the fps position and add a background behind it for easier reding

New added stats for the overlay are

FPS
FRAMETIME,
SPEED,
APP_RAM_USAGE,
SYSTEM_RAM_USAGE,
BATTERY_TEMPERATURE,
2025-04-13 05:36:30 +02:00
MrPurple666
e26a256a44 Fix Zephyron commits 2025-04-13 00:23:18 -03:00
Zephyron
777111dfb4 feat(video_core): Fix Linux compilation issues in Hybrid Memory Manager
- Added missing <thread> header for std::thread usage
- Added <fcntl.h> for O_CLOEXEC and O_NONBLOCK definitions
- Fixed struct initialization order in uffdio_copy to match declaration order

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:42:39 -03:00
Zephyron
34693001aa Add Windows support to Hybrid Memory Manager
This commit adds Windows-specific implementation of the fault-managed memory
system, providing similar functionality to the existing Linux/Android implementation.

Key changes:
- Added Windows-specific memory management using VirtualAlloc/VirtualFree
- Implemented Windows vectored exception handler for page fault handling
- Added proper memory protection and page fault handling on Windows
- Updated memory snapshot functionality to work on Windows
- Added proper cleanup of Windows-specific resources
- Fixed type conversion issues in memory management code
- Added proper error handling for Windows memory operations
- Fixed VRAM Memory Layout Mode to allow up to 12Gb

The implementation uses Windows-specific APIs:
- VirtualAlloc/VirtualFree for memory management
- AddVectoredExceptionHandler for page fault handling
- VirtualProtect for memory protection management

This change maintains feature parity with the Linux/Android implementation
while using Windows-native APIs for better performance and reliability.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:42:24 -03:00
Zephyron
9615e910f9 feat(video_core): Implement HybridMemory for advanced Vulkan memory management
Adds a new cross-platform memory management system with enhanced capabilities:
- Fault-managed memory allocation for Linux/Android platforms
- Memory snapshot and differential snapshot support
- Predictive memory reuse tracking for optimized access patterns
- Vulkan compute buffer integration
- User-configurable settings for enabling features

The system integrates with the existing Vulkan renderer to provide more
efficient memory handling, especially for compute-intensive workloads.

Co-authored-by: boss.sfc <boss.sfc@citron-emu.org>
Co-committed-by: boss.sfc <boss.sfc@citron-emu.org>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:41:26 -03:00
Zephyron
0c5659a198 video_core: Enhance Vulkan shader compilation with async threading system
Implement a robust asynchronous shader compilation system inspired by commit
1fd5fefcb17fe7fe65faed1c991fb41db782ab0f. This enhancement provides:

- True multi-threaded shader compilation with atomic status tracking
- Persistent disk caching for faster shader loading
- Command queue system for background processing
- Integration with Citron's scheduler for better resource management
- Parallel shader loading to reduce startup times
- Improved error handling and recovery mechanisms

These changes significantly reduce shader compilation stuttering and improve
overall performance when using asynchronous shaders. The implementation
maintains compatibility with Citron's existing architecture while adding
more robust threading capabilities.

Co-authored-by: boss.sfc <boss.sfc@citron-emu.org>
Co-committed-by: boss.sfc <boss.sfc@citron-emu.org>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:39:24 -03:00
Zephyron
b550c6e3cc feat(vulkan): implement enhanced texture and shader management
This commit adds improved Vulkan functionality to the Citron emulator:

- Add thread-safe texture management with automatic error recovery
- Implement shader caching with validation support
- Add robust error handling for Vulkan operations
- Implement platform-specific initialization for Windows, Linux, and Android

These enhancements improve stability when handling texture loading errors
and provide better recovery mechanisms for Vulkan failures.

Co-authored-by: boss.sfc <boss.sfc@citron-emu.org>
Co-committed-by: boss.sfc <boss.sfc@citron-emu.org>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:39:19 -03:00
Zephyron
991770b84f build: fix linux compilation
- Removes unnecessary \ from Copyright Line Causing Linux Builds To Fail

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:37:27 -03:00
Zephyron
c57a5fef92 WIP: Enhance shader compilation performance and control
This commit adds new settings and optimizations for shader compilation:

- Add new settings:
  - use_enhanced_shader_building: Enable enhanced shader compilation
  - shader_compilation_priority: Control shader compilation priority

- Improve shader compilation performance:
  - Optimize worker thread allocation based on CPU cores
  - Add smarter async shader compilation heuristics
  - Prioritize vertex and fragment shader compilation
  - Add performance tracking and logging

- Add performance monitoring:
  - Track shader compilation times
  - Log slow shader compilations
  - Monitor async shader compilation statistics

This is a work in progress commit. Further optimizations and refinements
will be needed based on testing and feedback.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:37:11 -03:00
bc86307ad6 Service: Add AliasRegionExtraSize
Thanks to Briar for finding and testing the Service
Credit: Antique - [Sudachi] Dev (https://sudachi.emuplace.app/)
2025-04-12 22:54:32 -03:00
MrPurple666
be4bc3b477 WIP: DO-NOT-MERGE: NCE experiments: Better Pre-Fetch implementation
should make it more performatic as in use with new lru cache implmentation
2025-04-12 22:54:32 -03:00
MrPurple666
739e5c47ea WIP: DO-NOT-MERGE: NCE experiments: Better LRU cache implementation
It uses a better lru implementation, since initial as basic functions to LRU, use a modern system to it to make performance better
2025-04-12 22:54:32 -03:00
MrPurple666
ce1a1912ae RenderVulkan Experiments: DO-NOT-MERGE: Only recreate when necessary and NEAREST 2025-04-12 22:54:32 -03:00
MrPurple666
2a793d610d RenderVulkan Experiments: DO-NOT-MERGE: Introduce functionality to frame interpolation
The functionality acts much more like a real-time downscale since the FSR1 used by Yuzu is not compatible with a real interpolation and is just upscale and downscale.
2025-04-12 22:54:32 -03:00
Pavel Barabanov
38737f26e5 Optimize SpiriV output 2025-04-12 22:54:32 -03:00
Pavel Barabanov
bd2f935c4d delete "enable" in setting.h 2025-04-12 22:54:32 -03:00
Pavel Barabanov
be2e838f0d FRAME_SKIPPING and FRAME_INTERPOLATION only android and delete "enable" 2025-04-12 22:54:32 -03:00
Pavel Barabanov
70c2439d8c Add sync core speed 2025-04-12 22:54:32 -03:00
Pavel Barabanov
d25bea5762 Android: add FRAME_SKIPPING and FRAME_INTERPOLATION 2025-04-12 22:54:32 -03:00
MrPurple666
f9f311c014 Revert "Merge branch 'pr-12'"
This reverts commit dfe104bbb96b52f47943462c296ecbcb046dffdf, reversing
changes made to 45683a4034.
2025-04-12 22:54:32 -03:00
50ac5e935a Update README.md
(again)
2025-04-12 17:05:56 +00:00
d29d7b931c Update README.md 2025-04-12 16:18:43 +00:00
d88d690a4e Merge pull request 'Service: Add AliasRegionExtraSize' (#22) from JPikachu/eden:master into master
Reviewed-on: #22
2025-04-12 15:33:38 +00:00
e0795f2b40 Service: Add AliasRegionExtraSize
Thanks to Briar for finding and testing the Service
Credit: Antique - [Sudachi] Dev (https://sudachi.emuplace.app/)
2025-04-12 16:23:47 +01:00
a6c9177ad1 Implement additions to nvdr services
Fixes log error: "[  41.472933] Debug <Critical> core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp:operator():81: Assertion Failed! Unimplemented ioctl=C0084713"

Credit: Antique - Sudachi dev, for the base Implementation and Citron for slight additions.
2025-04-11 17:48:09 -03:00
0d031e2f3f Merge pull request 'switch submodules to our forks' (#21) from crueter/eden:submodules into master
Reviewed-on: #21
2025-04-11 20:22:06 +00:00
Zephyron
45683a4034 video_core/vulkan: Improve texture format conversion handling
Refactors and improves the texture format conversion system in the Vulkan
renderer:

- Adds proper sRGB to linear conversion for depth formats
- Improves shader accuracy for ABGR8 SRGB to D24S8 conversion
- Adds gamma correction and proper depth range clamping
- Moves GetSupportedFormat implementation to header
- Cleans up format conversion switch statement
- Removes redundant format conversion paths

The changes improve accuracy when converting between color and depth
formats, particularly for sRGB sources. The shader improvements ensure
proper gamma correction and depth range handling.

Technical changes:
- Improves sRGB to linear conversion in fragment shader
- Adds proper depth value clamping
- Consolidates format conversion logic
- Removes duplicate GetSupportedFormat implementation
2025-04-11 17:05:41 -03:00
Zephyron
3e835ac3aa video_core: Add new shader format conversion pipelines
Adds several new shader-based format conversion pipelines to support additional
texture formats and operations:

- RGBA8 to BGRA8 conversion
- YUV420/RGB conversions
- BC7 to RGBA8 decompression
- ASTC HDR to RGBA16F decompression
- RGBA16F to RGBA8 conversion
- Temporal dithering
- Dynamic resolution scaling

Updates the texture cache runtime to handle these new conversion paths and adds
helper functions to check format compatibility for dithering and scaling
operations.

The changes include:
- New shader files and CMake entries
- Additional conversion pipeline setup in BlitImageHelper
- Extended format conversion logic in TextureCacheRuntime
- New format compatibility check helpers
2025-04-11 17:05:30 -03:00