Changes the StartupWMClass from "citron" to "org.citron_emu.citron" to ensure proper icon display in GNOME and other desktop environments. Without this matching the application ID, a generic icon is displayed instead of the proper application icon.
Credit: Shikakiben (shikakiru)
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Updates version constants to match Nintendo Switch firmware 20.0.1:
- HOS version numbers (20.0.1)
- Version hash
- Display version string
- Display title string
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This update further improves shader management and pipeline handling:
- Add advanced heuristics for smarter async shader compilation in both OpenGL
and Vulkan renderers, with better detection of UI and critical shaders
- Implement thread pool for prioritized shader compilation with proper progress
tracking and reporting
- Add predictive shader loading system to preload related shaders based on
pipeline transitions
- Implement pipeline deduplication through Clone() method to reduce memory
usage and improve performance
- Add memory optimizations for shader translation and SPIR-V generation
- Enhance error handling and logging for shader operations
- Introduce batch loading and directory-based shader preloading capabilities
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Fix multiple issues in the Vulkan asynchronous presentation implementation:
- Convert regular mutexes to timed_mutex for timeout support
- Use condition_variable_any for compatibility with timed_mutex
- Fix thread synchronization with proper locking and error handling
- Add VkResultToString helper to replace missing ToString function
- Implement better error recovery with recreation attempt limits
- Add comprehensive logging for better troubleshooting
These changes make the asynchronous presentation feature more robust
and less prone to deadlocks, while keeping it disabled by default since
it may still cause instability in some games.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit disables GPU memory management, memory snapshots, and NCE
functionality by forcing these settings to false throughout the codebase.
The changes include:
- Hardcoding false values in renderer_vulkan.cpp initialization
- Disabling UI controls for these features in configuration screens
- Forcing settings to false during configuration read/write operations
These features are being disabled to improve stability and prevent
potential memory-related issues.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Updates version constants to match Nintendo Switch firmware 20.0.0:
- HOS version numbers (20.0.0)
- Version hash
- Display version string
- Display title string
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit makes firmware non-mandatory for the emulator to function. Changes include:
- Converting firmware errors to warnings in loader
- Removing firmware requirement checks in Android
- Removing firmware and title.keys setup screens
- Adding --allow-unsupported flag for Android vcpkg
- Updating vcpkg baseline
- Enforce software keyboard in Android
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Temporarily roll back the following submodules:
- VulkanMemoryAllocator: 2f382df → 539c0a8
- Vulkan-Headers: 80207f9 → e2e53a7
- Vulkan-Utility-Libraries: 524f891 → 4e246c5
This is for testing purposes only and should only be used for developers.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Update required VulkanHeaders from 1.4.307 to 1.4.313
- Ensures compatibility with newer Vulkan development packages
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Updates UDP client and related test files to use boost::asio::io_context
instead of the deprecated io_service. This change is required for compatibility
with newer versions of Boost ASIO, which has renamed the class.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Fixes Windows compilation error by removing the WSAEBUSY case in TranslateNativeError.
- This error code does not exist in the Windows Sockets API as documented in the Microsoft documentation, but was incorrectly included in the Windows-specific error handling code.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Update SDL to fix pipewire-related compile error
- Removes need to hardcode -DSDL_PIPEWIRE=OFF in toolchain
- Update vcpkg to latest version
- Update Vulkan-Headers to latest version
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Add support for missing errno values needed by TOTK:
- Add BUSY (16) for "Device or resource busy" errors
- Add NOTSOCK (88) for "Socket operation on non-socket" errors
Improvements:
- Update TranslateNativeError on both Windows and Unix to handle new error codes
- Change socket error logging for NOTSOCK from WARNING to DEBUG level
- Fix formatting in Unix errno translation code
- Update shader storage buffer tracking range to accommodate TOTK buffers
- Add hex format to storage buffer logging for easier comparison with bias range
- Change storage buffer tracking log level from WARNING to DEBUG
These changes help prevent error messages in games
that use network features not fully implemented in the emulator yet.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Updates the Android Vulkan Validation Layer (VVL) from version 1.4.304.1
to 1.4.309.0. This ensures compatibility with the latest Vulkan specification
and provides improved validation capabilities for the Android build.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Updates the Android build configuration with several important changes:
- Change application ID from com.antutu.ABenchMark to org.citron.citron_emu
- Upgrade CMake version from 3.31.6 to 4.0.1
- Update Android Gradle plugin from 8.9.0 to 8.9.2
- Add CMAKE_POLICY_VERSION_MINIMUM=3.5 to CMake arguments
- Keep Kotlin version at 1.9.20
These changes align the Android package identifier with the Citron project
and update build tool versions to ensure compatibility with modern Android
development requirements.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Resolves a variable shadowing issue in AsyncCompileShader where the callback
lambda parameter was shadowing the outer callback variable. This was causing
compilation warnings/errors in Android Studio. The fix:
- Renames the outer callback variable to 'outer_callback'
- Renames the inner lambda callback parameters to 'inner_callback'
- Maintains consistent naming across all error handling paths
This change improves code clarity and eliminates compiler warnings while
maintaining the same functionality for async shader compilation.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Implements a more robust error handling approach when storage buffer lookups
fail in the buffer cache. Instead of returning a null binding, the code now:
- Provides a fallback buffer with safe default values
- Implements warning rate limiting to prevent log spam
- Tracks warning counts per cbuf_index
- Logs detailed debug information periodically
This change helps prevent potential crashes when storage buffer lookups fail
while still maintaining visibility into the issue through strategic logging.
The fallback mechanism uses a safe static address and a reasonable buffer
size (16KB) to handle cases where the normal GPU to CPU address translation
fails.
Also updates copyright headers to include citron Emulator Project.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Implement several improvements to the texture cache memory management system
to address memory leaks that occur in memory-intensive games like TOTK
(Title ID 0100F2C0115B6000). These changes prevent the gradual memory
increase that eventually leads to crashes or undefined behavior.
Key improvements:
- Enhance garbage collection with more aggressive cleanup thresholds
- Add emergency resource cleanup for persistent high memory usage
- Improve DeleteImage to ensure proper resource deallocation
- Make DelayedDestructionRing thread-safe with proper mutex protection
- Track consecutive high-memory frames to detect potential leaks
- Add emergency cleanup mechanism for extreme memory pressure situations
- Use proper type casting in std::max to fix compilation errors
This should significantly improve stability during extended gameplay
sessions with memory-intensive titles.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Add Nintendo Switch network service implementations to support modders
working with network functionality in their game modifications:
- Add nn::socket utilities including InetAton and Connect functions
- Implement sockaddr/in_addr structures matching official Nintendo APIs
- Add nn::nifm networking interface services with IsNetworkAvailable and SubmitNetworkRequest
- Implement nn::nim network installation management services
- Fix BSD socket implementation to properly handle proxy packets
- Add Service_BSD log category for better debugging
These changes provide crucial networking API support for modders like
MaxLastBreath and projects like NX Optimizer (https://www.nxoptimizer.com/)
that need to hook into Nintendo's network services for code injection mods.
This implementation follows the official documentation at SwitchBrew and
enables proper network connectivity in modded games.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Update Vulkan-Headers, Vulkan-Utility-Libraries, VulkanMemoryAllocator, and vcpkg submodules to their latest versions to ensure compatibility with newer Vulkan features and improve rendering performance.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Fix variable shadowing in ShaderManager constructor by renaming parameter
- Remove unused variables in vk_texture_manager.cpp to avoid warnings
- Fix int conversion warning in syscall return value
These changes fix build errors when using certain optimized compile flags for Linux.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Fixes issues in commit bbd3253169 that could cause
crashes and deadlocks. The feature now works as intended, allowing games using
present interval 0 to run with truly unlocked FPS.
This ensures proper functionality of dynamic framerate mods like UltraCam
by MaxLastBreath (https://www.nxoptimizer.com/) without stability problems.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Implement a slider in the CPU settings tab to adjust the BASE_CLOCK_RATE
up to 1,785 MHz (Switch's official maximum clock rate). Default remains
at 1,020 MHz.
This change:
- Adds UI slider and spinbox to configure_cpu.ui with range 500-1785 MHz
- Makes BASE_CLOCK_RATE dynamic by reading from settings
- Modifies WallClock to handle dynamic clock rate changes
- Updates APM controller to properly set the clock rate
- Changes clock rate settings category from Core to CPU
The user can now easily adjust the CPU clock rate to improve performance
or manage thermals and power consumption.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
When enabled, this feature allows games using present interval 0 to run with
truly unlocked FPS, matching actual hardware behavior more accurately.
Previously, Citron would cap present interval 0 at 120FPS to conserve battery,
but this prevented proper functionality of dynamic framerate mods like UltraCam
by MaxLastBreath (https://www.nxoptimizer.com/).
The setting is disabled by default to maintain the current behavior for most users.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit implements various network services required for newer firmware
versions. Key changes include:
- Add bsd:nu service for firmware 15.0.0+ with proper event handling
- Add bsdcfg implementation with complete interface declarations
- Add dns:priv and ethc (c/i) services
- Register all new services in the service manager
- Extend BSD implementation with additional socket operations
- Remove room_network instance variable in favor of system.GetRoomNetwork()
- Fix kernel event creation by using ServiceContext in all appropriate places
- Update build system to include new source files
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Remove special handling for reversed depth scenarios that were added for Civilization 7
- Remove excessive logging in Vulkan renderer
- Update Discord client ID
- Update Vulkan-related external dependencies
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- 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>
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>
Improve GPU storage buffer detection and memory access patterns:
- Expand NVN bias address range (0x100-0x800 vs 0x110-0x610)
- Increase alignment from 16 to 32 bytes for optimal memory access
- Raise default alignment from 8 to 16 bytes for non-biased addresses
- Refactor bias handling code for better readability
- Add detailed performance-related comments
These changes help identify more storage buffers within shaders and
ensure memory accesses are better aligned, which improves overall
shader compilation and execution performance.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
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>
Improve GPU storage buffer detection and memory access patterns:
- Expand NVN bias address range (0x100-0x800 vs 0x110-0x610)
- Increase alignment from 16 to 32 bytes for optimal memory access
- Raise default alignment from 8 to 16 bytes for non-biased addresses
- Refactor bias handling code for better readability
- Add detailed performance-related comments
These changes help identify more storage buffers within shaders and
ensure memory accesses are better aligned, which improves overall
shader compilation and execution performance.
Update Vulkan dependencies to their latest versions.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit makes two significant improvements:
1. Vulkan renderer:
- Detect and properly handle reversed depth buffers (clear_depth < 0.5)
- Force depth write enable when needed with reversed depth
- Use GREATER_OR_EQUAL comparison for reversed depth scenarios
- Fix transparency issues in games like Civilization 7 by adjusting blend factors
- Add detailed logging for depth buffer operations
2. Friend service:
- Implement previously stubbed functions including EnsureFriendListAvailable
and EnsureBlockedUserListAvailable
- Add proper event signaling to prevent games from hanging
- Implement Cancel function for improved compatibility
- Update copyright notice for the Citron project
These changes improve compatibility with modern games using reversed depth
buffers and prevent hangs in titles that rely on Friend service functionality.
Co-authored-by: m33ts4k0z <m33ts4k0z@citron-emu.org>
Co-committed-by: m33ts4k0z <m33ts4k0z@citron-emu.org>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Implement a robust asynchronous shader compilation system inspired by commit
1fd5fefcb1. 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>
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>
Add a flexible memory region management system that provides:
- Memory region type classification (System, Graphics, IO, Binary)
- Memory region permission management (executable, writable)
- Binary base address randomization for ASLR
- Dynamic memory mapping capabilities
Credit: boss.smc@citron-emu.org
Signed-off-by: Zephyron <zephyron@citron-emu.org>
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>
- Change SDL2 bundled version from 2.32.0 to 2.28.2
- Downgrade clang-format version from 18 to 15
- Replace citron-emu.org URLs with GitHub mirror URLs:
- Update clang-format download URL to use yuzu-mirror repository
- Update package base URL for external dependencies
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Update Vulkan-Headers from cacef303 to 78c35974
- Update VulkanMemoryAllocator from c788c521 to 29b35ea4
- Update vcpkg from e40d24cb to a7d06b3a
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Add copyright notice for citron Emulator Project
- Standardize Nintendo vendor ID format to uppercase (057E) in Bluetooth controller rules
- Maintain same permissions and access settings for all controllers
REF: 6ead429195
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/106
Co-authored-by: deftdawg <deftdawg@noreply.localhost>
Co-committed-by: deftdawg <deftdawg@noreply.localhost>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit disables the "Kiosk (Quest) Mode" checkbox in the debug configuration
UI by setting it to non-interactive and adding a tooltip indicating that the
feature has been disabled.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit disables the "Enable Auto-Stub" checkbox in the debug configuration
UI by setting it to non-interactive and adding a tooltip indicating that the
feature has been disabled.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Modify CMakeLists.txt to detect whether the host system is Windows or Linux
- Set VCPKG_HOST_TRIPLET dynamically to either "x64-windows" or "x64-linux" based on CMAKE_HOST_SYSTEM_NAME
- Previously, the host triplet was hardcoded to "x64-windows", which prevented proper building on Linux hosts
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Added registration for the 'ssl:s' service using the same implementation as
the regular 'ssl' service. This fixes issues with certain titles that hang indefinitely while
waiting for this service to become available.
The issue appears in logs as:
"Server is not registered! service=ssl:s"
"Waiting for service ssl:s to become available"
This is a simple fix that reuses the existing SSL implementation instead of
creating a separate one, as both services share the same functionality.
This commit enhances the Multiplayer Function
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit addresses critical TLB (Translation Lookaside Buffer) issues on Android by implementing several optimizations:
- Add new BufferCacheAccelerator to manage memory range overlap detection
- Implement TLB-aware memory barriers to prevent unnecessary invalidations
- Add a TLB caching system to avoid redundant flushing operations
- Create a counter to limit outstanding memory operations and prevent TLB thrashing
- Implement TLB prefetching for better memory access patterns
- Add targeted memory barriers for more precise synchronization
These changes significantly reduce the likelihood of the "0.0 FPS deadlock" issue on Android devices by maintaining a more stable TLB state and preventing cache thrashing.
TODO: Merge & Adapt Camille LaVey's TLB Method To Further Improve
Signed-off-by: Zephyron <zephyron@citron-emu.org>
The Profile-Guided Optimization configuration was previously placed at the
end of the CMakeLists.txt file, after all targets were already defined.
This was causing the PGO flags to have no effect on the build process.
This commit moves the PGO configuration to immediately after the initial
compiler flags setup and before any targets are defined, ensuring that
all targets will properly receive the PGO instrumentation or optimization
flags when those options are enabled.
This allows both CITRON_ENABLE_PGO_INSTRUMENT and CITRON_ENABLE_PGO_OPTIMIZE
to function correctly for all build targets.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Added conditional check for AMD graphics drivers
- Automatically disable logic operations when float vertex attributes
are present to work around driver quirks
- Maintain original logic op state to preserve emulator behavior
- Prepare dynamic state management infrastructure for future
OpenGL implementation changes
OpenGL implementation will follow in subsequent commits.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- This Commit Accidentally Slipped By In A Previous Commit (dad8859679)
- This Has Caused Many Errors & Networking Issues Particularly On Android
- Now Uses Safe, Default 1.02 GHz
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Update Kotlin from 1.9.20 to 2.1.20-RC2
- Upgrade Java version from 17 to 21
- Update Android Gradle plugin from 8.1.2 to 8.9.0
- Update Gradle wrapper from 8.10.2 to 8.11.1
- Update NDK version to 29.0.13113456 rc1
- Update all Android dependencies to latest versions
- Simplify ARM NCE implementation by removing custom TLB handling
- Improve alignment and access fault handling
- Update hardware BASE_CLOCK_RATE from 1.02GHz to 1.785GHz
- Add citron Emulator Project copyright notices
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Update the following external dependencies:
- Vulkan-Headers: 0f0cfd8 → cacef303
- Vulkan-Utility-Libraries: 50563f4 → bc3a4d9f
- vcpkg: cd1099f4 → e40d24cb
This commit updates the external dependencies to their latest
compatible versions to ensure we're using up-to-date libraries.
- Removed "Open Quickstart Guide" menu item and associated functions
- Replaced ROM loading error popup containing quickstart guide links
with a neutral disclaimer stating the software is provided as-is
without warranty or support
- This change helps minimize legal liability by avoiding
specific instructional content while directing users to community
resources for assistance
Adds support for Profile-Guided Optimization builds on both Windows (MSVC)
and Linux (GCC/Clang) platforms. This allows for performance optimizations
based on real usage patterns.
For MSVC:
- Adds /GL and /LTCG:PGINSTRUMENT flags for instrumentation
- Adds /GL and /LTCG:PGOPTIMIZE flags for optimization
For GCC:
- Adds -fprofile-generate flags for instrumentation
- Adds -fprofile-use flags for optimization
For Clang:
- Adds -fprofile-instr-generate flags for instrumentation
- Adds -fprofile-instr-use flags for optimization
Controlled by two new CMake options:
- CITRON_ENABLE_PGO_INSTRUMENT: Enable instrumentation build
- CITRON_ENABLE_PGO_OPTIMIZE: Enable optimization build
Updated submodules:
- Vulkan-Headers to 0f0cfd8
- Vulkan-Utility-Libraries to 50563f4
- vcpkg to cd1099f
Remove duplicate firmware presence check in EmulationActivity. The
isFirmwareAvailable() check already handles this functionality, making
checkFirmwarePresence() redundant.
- Revert Android Gradle plugin from 8.8.1 to 8.1.2
- Downgrade Kotlin version from 2.1.20-RC to 1.9.20
- Lower Java/JVM target from 21 to 17
- Reduce CMake version from 3.31.5 to 3.22.1
- Update various Android dependencies to stable versions:
- Navigation Safe Args plugin to 2.6.0
- ktlint to 0.47.1
- Play Publisher plugin to 3.8.6
- Remove custom APK naming scheme
- Fix CMake boolean arguments (OFF -> 0)
- Remove citron copyright header
This commit enhances the Translation Lookaside Buffer (TLB) implementation
in the ARM Native Code Execution (NCE) component to increase stability,
particularly on Android devices. The changes prioritize robustness and
error recovery over performance optimizations.
Key improvements:
- Replace set-associative TLB with a simpler linear search implementation
- Implement a basic LRU replacement policy for TLB entries
- Add validation checks for memory addresses before TLB insertion
- Ensure proper page alignment for guest and host addresses
- Enhance alignment fault handling with instruction skipping as fallback
- Add comprehensive debug logging for memory access errors
- Improve error recovery in guest memory access scenarios
These changes should significantly reduce crashes during emulation on
Android devices by gracefully handling memory access edge cases that
previously resulted in hard crashes.
Co-Authored-By: Camille LaVey <camillelavey@citron-emu.org>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Add proper handling of input topologies in the Geometry stage for all three
shader backends (GLASM, GLSL, SPIRV). This implementation uses a lookup table
approach to determine vertex counts based on input topology type (Points,
Lines, LinesAdjacency, Triangles, TrianglesAdjacency) and shifts the vertex
count by 16 bits as required by the invocation info format.
Additional changes:
- Fixed TessellationControl and TessellationEval stages to properly break
after emitting code
- Added proper header include for runtime_info.h in GLASM backend
- Improved code documentation with clear commenting patterns
This change ensures accurate geometry shader behavior across all backends,
improving compatibility with games that rely on proper vertex count reporting.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit implements a requirement for firmware to be installed before titles
can be launched, similar to how keys are required.
Changes include:
- Add IsFirmwareAvailable method to KeyManager to check for essential keys
- Add CheckFirmwarePresence method to verify actual firmware files (NCAs)
- Add firmware checks in game loading process for both desktop and Android
- Add error messages when firmware is missing
- Add strings for firmware-related error messages
The implementation checks for both essential keys and the presence of system
applets like Mii Edit and Home Menu to ensure proper firmware is installed.
Games will not launch if firmware is missing, and users will be shown an
appropriate error message.
This commit removes the functionality that automatically generates and writes
keys to *_autogenerated files. The key derivation logic is preserved, but
derived keys are now only stored in memory and not written to disk.
Changes include:
- Remove loading from *_autogenerated key files
- Make WriteKeyToFile a no-op function
- Remove all file writing operations in SetKey methods
- Remove file writing for keyblobs and other derived keys
- Update copyright notices
This change improves security by not storing derived keys on disk and
simplifies the key management system.
Adds a software TLB cache to improve memory access performance in the NCE
(Native Code Execution) system. Key changes include:
- Implement set-associative TLB with 64 sets and 8 ways
- Add TLB lookup before memory access in HandleGuestAccessFault
- Implement LRU replacement policy with access frequency consideration
- Add thread context caching to reduce overhead
- Add proper synchronization with mutex locks
- Add helper functions for TLB management (lookup, insert, invalidate)
This change should improve performance by reducing redundant memory
translations and providing faster access to frequently used pages.
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.
Updates various build dependencies and configurations for the Android build:
* Upgrade Android Gradle Plugin to 8.8.1
* Update Kotlin to 2.1.20-RC
* Upgrade NDK to 28.0.13004108
* Update target/compile SDK to Android 35
* Upgrade Java/Kotlin target to JVM 21
* Enable additional release optimizations (shrinkResources, proguard-android-optimize)
* Update CMake to 3.31.5
* Update various AndroidX and support library dependencies
* Change CMake boolean flags from 0/1 to OFF/ON
* Update ktlint to 0.51.1 and related plugins
This commit modernizes the Android build system and enables additional
optimizations for release builds.
Changes the default value of use_auto_stub from false to true in the settings.
This setting controls whether unimplemented functions should be automatically
stubbed during execution.
Improve the Vulkan Validation Layer (VVL) download logic for Android by checking
for the final library file instead of just the zip archive. This prevents
unnecessary re-downloads and extractions when the library is already in place.
The check now looks for libVkLayer_khronos_validation.so in the final
destination path before attempting to download and extract the archive.
Implements a LicenseVerifier class to ensure app integrity and license compliance:
- Verifies the app's package name matches the official release
- Validates app signature against official release signature
- Allows debug and EA (Early Access) builds
- Shows violation dialog and exits if verification fails
- Enforces GPLv3 license compliance for modified versions
This helps prevent unauthorized modified versions from being distributed
without source code, as required by the GPLv3 license.
Remove the TranslateIPv4 function that converts in_addr to IPv4Address, as it
appears to be unused or redundant. The functionality might be handled elsewhere
in the codebase or no longer needed.
- Return loopback address (127.0.0.1) when no network interface is selected
- Improve IPv4 address string conversion and handling
- Add explicit handling for "None" network interface selection
- Change IsAnyInternetRequestAccepted logging from ERROR to DEBUG
- Simplify internet request acceptance check to assume availability
This change makes the network interface handling more robust by providing
fallback behaviors and improving address resolution. It also reduces
unnecessary error logging for expected scenarios.
This commit adds support for launching the system Home Menu and implements
several system-level improvements:
- Add Home Menu launch functionality through new UI action
- Implement shutdown/reboot sequence handlers in GlobalStateController
- Add support for reserved region extra size in page tables
- Enhance audio controller with output management
- Expand parental control service capabilities
- Add profile service improvements for user management
Technical changes:
- Add OnHomeMenu() handler to launch QLaunch system applet
- Implement m_alias_region_extra_size tracking in page tables
- Add new CreateProcessFlag for reserved region extra size
- Expand audio controller interface with output management
- Add self-controller methods to various services
- Implement play timer and profile service improvements
The changes primarily focus on system menu integration and core service
improvements to better support system functionality.
- Add operator== to ImageInfo and ImageViewInfo classes to enable direct equality comparisons. The implementations use std::tie to perform member-wise comparisons of all relevant fields in a safe and efficient manner.
This allows for easier comparison of texture cache entries and view
information, which can be useful for cache management and debugging.
Update fmt library to version 11.0.2 and make necessary adjustments:
- Replace fmt/format.h includes with fmt/ranges.h
- Add const qualifiers to formatter::format functions
- Update CMake to require fmt version 11
Additional dependency updates:
- Update SDL2 bundled version from 2.28.2 to 2.32.0
- Update catch2 to version 3.8.0
- Update vcpkg baseline to c82f74667287d3dc386bce81e44964370c91a289
- Removes STUBBED designation as implementation is now complete
- Changes log level from WARNING to DEBUG
- Properly sets the exit request flag under lock protection
- Removes STUBBED designation as implementation is now complete
- Changes log level from WARNING to DEBUG
- Adds proper locking when accessing the display layer manager
- Fixes parameter alignment in function declaration
Removes the STUBBED designation from GetNativeHandle in IHOSBinderDriver
as the implementation is now complete. Changes the log level from WARNING
to DEBUG to reflect this status.
The function properly handles binder ID validation and returns the
appropriate handle as documented in switchbrew.
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
Implements the CheckAddOnContentMountStatus command for the aoc:u service.
This function checks whether add-on content (DLC) is currently mounted.
Currently returns false as we don't yet track mounted content state.
Changed log level from WARNING to DEBUG since this is no longer stubbed.
- Update NASM version from 2.16.01 to 2.16.03
- Change NASM download URL to use official nasm.us source
- Update clang-format version from 15 to 18
- Update compatibility list and clang-format download URLs to use citron-emu.org
Thanks to Mangax for suggesting these updates.
- Simplify Qt version selection to always use 6.8.2 instead of conditional versions
- Update bundled externals URL to use git.citron-emu.org/Citron
- Update MSVC toolchain references from 2019 to 2022 for Qt paths
This change streamlines Qt version management and updates the infrastructure
to use newer MSVC toolchain paths.
Update Android build configuration to use the latest NDK version 28.0.13004108
and Java JDK 21. This includes:
- Updating ndkVersion from 26.3.11579264 to 28.0.13004108
- Upgrading Java compatibility from Java 17 to Java 21
- Setting Kotlin JVM target from 17 to 21
These changes modernize the Android build toolchain and ensure compatibility
with the latest development tools.
Fix Android compilation with latest NDK (28.0.13004108) and Java JDK 21 by
renaming the resolve_image variable to resolve_image_holder to avoid potential
naming conflicts. This change helps maintain compatibility with the updated
build toolchain while keeping the core functionality intact.
The change affects the MSAA image copy operation in the Vulkan texture cache
implementation.
- Add network interface enumeration support for Android
- Implement fallback loopback interface when no interfaces are detected
- Add ability to force offline mode on critical network errors
- Improve socket initialization with better error handling
- Add socket state tracking (domain, type, protocol)
- Make translation functions static and mark as maybe_unused
- Add detailed logging for network initialization failures
Part 2 of the Android FPS bug fix focuses on network resilience,
particularly handling cases where network initialization fails.
Instead of hanging the emulator, it now gracefully falls back to
offline mode and provides better diagnostic information.
- Reduce max_memory_size from 512GB to 1GB for safer allocation limits
- Add memory operation logging for debugging purposes
- Implement MapMemory() with additional safety checks and large allocation handling
- Add validation checks for memory mappings
- Introduce chunked allocation strategy for large memory requests
- Add detailed error logging for memory operations
Update magic numbers and default identifiers across codebase:
- UUID default value
- Thread magic number
- Amiibo name
- Vulkan cache magic number
- Shader cache magic number
- Remove unused function stubs
- Add version information comments
- Add clang-format markers
- Remove duplicate TrySelectUserWithoutInteraction function
- Fix formatting and code style
Change the remote URLs for the following submodules to point to Citron's Git server:
- dynarmic
- discord-rpc
- sirit
- mbedtls
- breakpad
- oaknut
This migrates these dependencies from yuzu-mirror GitHub repositories to
Citron's self-hosted Git server while maintaining the same codebase.
- Add implementations for previously stubbed functions:
* Cancel - Handle operation cancellation
* RequestSyncFriendList - Friend list synchronization
* GetUserPresenceView - User presence information
* LoadUserSetting - User settings loading
- Improve GetCompletionEvent implementation:
* Add proper event signaling
* Use clearer variable names
* Improve debug logging
- Enhance logging messages:
* Add more descriptive debug messages
* Include user ID in presence view logging
* Use consistent naming in response builders
- Fix response builder formatting for consistency
These changes improve the friend service implementation by adding
support for more friend-related functionality while enhancing
the debugging experience through better logging and code
organization.
- 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.
- Add CreateServerInterface2 implementation for NIM_ECA service
- Change log level from WARNING to DEBUG for CreateServerInterface
- Add descriptive log message for server interface creation
- Maintain consistent interface creation pattern between both versions
- Fix missing comma in function registration array
These changes improve the NIM service implementation by adding
support for the newer server interface creation method while
making logging more appropriate for stubbed functions.
- Add missing <vector> include for std::vector usage
- Add Citron copyright notice
- Maintain existing include ordering
This is a minor cleanup change to ensure proper header inclusion
and copyright attribution.
- Add Nintendo Account related implementations:
* GetNintendoAccountId
* GetNintendoAccountUserResourceCache
* IsLinkedWithNintendoAccount
* StoreSaveDataThumbnailApplication
- Improve version handling:
* Add proper firmware version comments
* Implement deprecated and new TrySelectUserWithoutInteraction
* Update service interface versioning
- Clean up code organization:
* Remove redundant clang-format markers
* Fix constructor formatting
* Improve error handling in InitializeApplicationInfoBase
* Add proper debug logging
* Update copyright headers
- Add proper documentation for buffer types and sizes
These changes improve Nintendo Account integration support while
cleaning up the codebase and improving version compatibility
handling. The implementation provides stubs for network-related
functionality to allow applications to proceed while proper
integration is developed.
- Add implementations for previously stubbed functions:
* EnumerateNetworkInterfaces
* EnumerateNetworkProfiles
* ConfirmSystemAvailability
* SetBackgroundRequestEnabled
- Add proper debug logging for new implementations
- Update header with new function declarations
- Add Citron copyright notice
- Improve response builder naming for clarity
These implementations return success status with empty results
to allow applications to proceed while proper network interface
management is developed. Debug logging has been added to track
usage of these functions.
- Reorder error codes to match numerical order
- Rename RegisterClient to Initialize in service registration
to match actual function name
- Update function declaration order in header to match implementation
- Improve QueryPointerBufferSize implementation:
* Add proper documentation comment
* Use constexpr for maximum transfer memory size
* Use std::numeric_limits where appropriate
* Improve debug logging message
* Use meaningful constant name
These changes improve code organization and clarity while making
the service manager interface more consistent with Nintendo's
official naming conventions.
- Update default console serial number prefix from "YUZ" to "CIT"
- Improve GetSettingsItemValueImpl template implementation:
* Add proper buffer management using std::vector
* Fix potential buffer overflow issues
* Use clearer variable naming
* Add proper size handling with actual_size
* Use memcpy for safer data copying
These changes improve the safety of settings handling while
updating the emulator's identity to use the Citron prefix
instead of yuzu's.
- Move SetGestureOutputRanges function registration to be with other
gesture-related functions (next to ActivateGesture)
- Move SetGestureOutputRanges implementation to be with other
gesture-related implementations
- Change log level from WARNING to DEBUG for SetGestureOutputRanges
- Move function declaration to private section with other IPC handlers
- Update function ordering to match service registration order
These changes improve code organization by grouping related
functionality together and maintain consistency between the
interface registration and implementation ordering.
Fix spelling of "GetStateChangeEvent" function name in both INpnsSystem
and INpnsUser interfaces. The function was incorrectly spelled as
"GetStateChangeEVent" with a capital 'V'.
- Enable resource shrinking for release builds
- Disable JNI debugging in release builds
- Switch to optimized proguard configuration file
- Remove x86_64 ABI support
- Fix syntax error in dependencies block
- Update build optimization flags:
* Enable shrinkResources
* Use proguard-android-optimize.txt
* Disable JNI debugging for release builds
These changes improve the release build optimization and reduce
APK size by removing x86_64 support and enabling additional
resource optimization features. The build configuration is also
cleaned up by fixing a syntax error and using more aggressive
optimization settings.
Buffer Queue Changes:
- Add assertion for buffer state in free slots
- Improve error handling for buffer dequeuing
- Add buffer count validation checks
- Update log levels for better diagnostics
NVDRV Changes:
- Add host1x reference to nvhost_nvdec_common
- Improve ioctl error reporting with more detailed messages
- Reorder function declarations in nvhost_ctrl_gpu
- Add stub for unimplemented ioctl command 0x13
- Clean up initialization of boolean flags
These changes improve error handling and debugging capabilities
while adding additional safety checks for buffer management.
The nvdrv interface is also made more robust with better error
reporting and proper hardware access patterns.
Reorder the Errno enum values to be in ascending numerical order,
moving NOMEM (12) to be between AGAIN (11) and INVAL (22). This
improves readability and makes it easier to verify completeness
of the error code list.
- Move SDLSinkStream class definition to header file
- Add additional error checking for SDL audio device availability
- Limit audio channels to stereo
- Add format verification and warning messages
- Improve audio device initialization with better error handling
- Rename device variable to audio_device_id for clarity
- Add running state flag
- Update copyright header to include citron
This refactoring improves error handling and provides better debug
information when audio device initialization fails. The implementation
is now more robust and provides clearer feedback for troubleshooting
audio issues.
- Update Vulkan validation layers to 1.4.304.1
- Update Qt to 6.8.2
- Remove strict version requirements for various dependencies
- Update Vulkan-Headers, VulkanMemoryAllocator, and vcpkg submodules
- Reorganize discord-rpc compile options
This change makes the build system more flexible by removing unnecessary
version constraints while ensuring compatibility with newer versions of
key dependencies.
Removes the telemetry opt-in popup dialog and defaults telemetry to disabled.
The ShowTelemetryCallout function is simplified to just:
- Set telemetry to disabled by default
- Apply the setting
- Mark the callout as shown to prevent future popups
This change ensures user privacy by defaulting to no telemetry collection
without requiring user interaction.
Update the tinfoil.media URL requests to fetch game icons at 256x256 resolution
instead of 128x128, providing higher quality game icons in Discord Rich Presence.
Implement new audio features available in AudioRenderer Revision 13:
- Add AudioRendererRevision enum to track version-specific features
- Implement CompressorEffect with statistics tracking support
- Add SplitterDestination with previous volume reset functionality
- Add version checks for feature compatibility
The compressor provides dynamic range compression with configurable
parameters and optional statistics tracking. The splitter improvements
allow for more flexible volume management between audio transitions.
These changes maintain compatibility with older revisions while enabling
new features in Rev13.
Update the Atmosphere release version minor number from 0 to 8 to match
newer firmware versions. Also add copyright notice for citron Emulator
Project.
This change maintains compatibility with newer system versions while
preserving the existing version number format.
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.
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
Improve the validation logic in UnmapProcessCodeMemory by:
- Add missing size validation check at the start
- Reorganize validation checks into logical groups
- Simplify error handling using R_UNLESS macros
- Remove redundant page table range check
- Add copyright notice for Citron Emulator Project
- Add ResultInvalidSize constant definition
The changes make the validation code more concise and easier to follow
while maintaining the same validation requirements. Error handling is now
more consistent with other SVC implementations.
Improve organization of app dependencies in build.gradle.kts by grouping them
into logical categories:
- AndroidX Core & UI components
- AndroidX Navigation
- AndroidX Lifecycle
- AndroidX Other components
- Kotlin dependencies
- Third party libraries
This change makes the dependencies section more maintainable and easier to
understand by providing clear visual separation between different types of
dependencies. No actual dependency versions were changed.
Also fixes minor formatting in runGitCommand function.
Add more detailed debug logging and validation to the InvalidateNCE function:
- Add entry debug log showing NCE invalidation request details
- Add upfront validation of memory region before proceeding
- Add debug logs for rasterizer and separate heap handling cases
- Add warning logs for invalid address ranges and failed invalidations
- Improve error message formatting and clarity
- Group related operations with descriptive comments
These changes make it easier to debug NCE invalidation issues by providing
more visibility into the validation steps and failure cases.
Implements hardware-accelerated MSAA resolve functionality in the Vulkan
texture cache instead of relying on compute shaders. This change:
- Adds proper MSAA to non-MSAA image copy support using VkResolveImage
- Creates temporary resolve images with appropriate memory allocation
- Handles format compatibility checks with proper fallback to compute
- Manages image layout transitions and memory barriers
- Preserves existing compute shader fallback for unsupported formats
The implementation follows Vulkan best practices for MSAA resolve
operations and should provide better performance for supported formats.
Removes the warning message box that appears when encryption keys are missing.
The check for keys is still performed but no longer displays a popup to the
user. The firmware version and menu state updates are still maintained.
Adds special handling for memory allocation size on AMD and Qualcomm (Adreno)
drivers by aligning allocations to 4KB boundaries. This fixes potential memory
allocation issues on these drivers where unaligned allocations may fail or
cause undefined behavior.
Affected drivers:
- AMD Proprietary (AMDVLK)
- AMD Open Source (RADV)
- Qualcomm Proprietary (Adreno)
Renames 'size' parameter to 'length' in IsValidMapping() methods to avoid
conflicts with Android NDK macros that define 'size'. This fixes compilation
issues on Android platforms where the 'size' macro is defined.
- Downgrade Qt version from 6.8.1 to 6.7.3 as 6.8.1 is not yet widely available
- Add USE_DISCORD_PRESENCE check around discord-rpc compile options to prevent
build errors when Discord integration is disabled
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
- Switch from specific Qt modules to downloading all modules using '-m all'
- Update aqtinstall version from v3.1.18 to v3.2.0
This change allows for a more complete Qt installation and uses a newer
version of the aqtinstall tool.
Implements several improvements to memory handling and validation:
- host_memory: Add IsValidMapping() and IsDirectMappingEnabled() methods to
validate memory access
- host_memory: Fix virtual base offset calculation to use proper pointer
arithmetic
- host_memory: Add size field to track allocation size
- nvhost_ctrl_gpu: Return InvalidState instead of InvalidValue for TPC mask
buffer size validation
- Update copyright year for citron
The changes improve memory safety by adding explicit validation checks and
fixing pointer arithmetic in the virtual memory implementation.
Adds missing <memory> header include in common_types.h. This header is
needed for std::unique_ptr and other smart pointer types that may be used
by code including this header.
This commit makes two main changes:
1. Adds support for GetTpcMasks2 (ioctl 0x13) in nvhost_ctrl_gpu:
- Implements new GetTpcMasks2 method to handle TPC mask queries
- Adds IoctlGetTpcMasks structure to store mask parameters
- Returns conservative single TPC configuration for compatibility
2. Enhances memory mapping validation in HostMemory:
- Adds verification check after memory mapping operations
- Improves error handling for direct mapped address enabling
- Adds logging for mapping and direct address failures
Additional changes:
- Updates copyright headers to include citron Emulator Project
- Improves error handling and validation in several paths
- Adds debug logging for TPC mask operations
This improves GPU virtualization support and memory mapping reliability.
- Add new RAM usage overlay showing current/max memory usage with color gradient
- Simplify thermal overlay to show temperature in C/F with color indication
- Add SHOW_RAM_OVERLAY boolean setting (disabled by default in UI)
- Set default values for thermal overlay and black backgrounds to true
- Update copyright headers to include Citron Emulator Project
The RAM overlay displays native heap usage with color gradient from green
(low usage) to red (high usage). The thermal display was simplified to show
just temperatures while maintaining the color indication based on system
thermal status.
Implements conversion from sRGB color formats to D24S8 depth-stencil format
in the Vulkan renderer. This change includes:
- New fragment shader convert_abgr8_srgb_to_d24s8.frag that handles proper
sRGB to linear conversion before depth calculation
- Added shader to CMake build system
- Extended BlitImageHelper with new conversion pipeline and methods
- Updated texture cache to handle sRGB to D24S8 format conversion paths
The conversion properly handles sRGB color space by first converting to
linear space before calculating luminance values for the depth component,
while preserving alpha channel data for the stencil component.
Removes usage of std::wstring_convert and std::codecvt_utf8_utf16 which are
deprecated since C++17. Implements direct UTF conversions for:
- UTF16ToUTF8: Manual conversion with proper surrogate pair handling
- UTF8ToUTF16: Direct conversion supporting full Unicode range
- UTF8ToUTF32: New implementation with proper code point extraction
The new implementations are more robust and handle edge cases better while
avoiding deprecated functionality. Windows-specific code paths remain unchanged
using the existing UTF16W conversions.
This change improves maintainability and removes compiler warnings about
deprecated features while maintaining full Unicode support.
Adds initial support for rebootless system update related functionality:
- Add system archive title IDs for ApplicationBlackList, RebootlessSystemUpdateVersion,
and ContentActionTable
- Add NS service result codes for system update operations
- Implement stubs for ISystemUpdateControl::SetupToReceiveSystemUpdate and
RequestCheckLatestUpdateIncludesRebootlessUpdate
- Add RebootlessSystemUpdateVersion settings type and implement
GetRebootlessSystemUpdateVersion in SET service
- Fix GetSettingsItemValueImpl template implementation
This provides basic infrastructure for handling system updates, particularly
the rebootless update feature, though actual update functionality remains
stubbed.
- Replace stubbed InitialProcessIdRange implementation with proper bounds (1-0x50)
- Add handle and info_sub_id validation for InitialProcessIdRange
- Replace process exit ASSERT with graceful error handling and logging
- Add try-catch block around system.Exit() for safer shutdown
- Add atomic header inclusion for binder.h
This improves system call reliability by properly implementing process ID
range checks and adding safer process exit handling with proper error logging.
Updates all GitHub repository URLs to point to the new self-hosted Git instance
at git.citron-emu.org. This includes:
- Links in the About dialog UI and translations
- Android app string resources
- Documentation/wiki links
- Source code comments
The website URL (citron-emu.org) and support links remain unchanged.
Implements support for ENOMEM (errno 12) across the network stack:
- Added NOMEM to Network::Errno enum
- Added NOMEM = 12 to sockets Errno enum
- Added translation case in sockets_translate.cpp
This is the first step towards addressing the 0.0 FPS bug that occurs
when the system runs out of memory during socket operations. Previously,
these operations would trigger an unimplemented assertion, causing the
emulator to halt. Now the error will be properly propagated to the guest
application.
Updates QCheckBox signal connections to use checkStateChanged instead of
the deprecated stateChanged signal. This change affects:
- qt_controller.cpp
- configure_filesystem.cpp
- configure_input.cpp
- configure_input_advanced.cpp
- configure_system.cpp
- configure_ui.cpp
- shared_widget.cpp
Also updates lambda signatures to use Qt::CheckState instead of int for
the state parameter where needed.
Adjusts VRAM allocation strategy to be more conservative while maintaining
performance:
- Increases reserve memory from 1/8th to 1/4th (max 2GB) for discrete GPUs
- Increases base memory limit from 6GB to 8GB
- Doubles resolution scaling memory from 1GB to 2GB per scale factor
- Reduces system memory reservation from 8GB to 4GB for integrated GPUs
- Increases maximum memory limit from 4GB to 6GB for integrated GPUs
These changes help prevent memory leaks while still providing adequate
VRAM for optimal performance.
- Update Vulkan-Headers to e43027a (1.4.306)
- Update Vulkan-Utility-Libraries to 8ec8482
- Update vcpkg to 2b8927f
- Remove version constraint for fmt package requirement
- Update VulkanHeaders version requirement to 1.4.306
This updates several external dependencies to their latest versions and
removes the specific version requirement for fmt while maintaining the
REQUIRED flag. The Vulkan-Headers version requirement is updated to match
the new submodule version.
Updates Android build configuration to use newer versions:
- Upgrade Java/JVM target from 17 to 21
- Update Android Gradle Plugin from 8.1.2 to 8.8.0
These changes modernize the Android build system to use the latest LTS
version of Java and the most recent stable Android Gradle Plugin.
This enables access to newer language features and build optimizations
while maintaining compatibility with modern Android development tools.
Adds missing include for common/logging/log.h in gpu.h which was causing
compilation failures on Android. This header is needed for logging
functionality used in GPU-related operations.
The include was previously indirectly available through other headers,
but making it explicit improves code clarity and prevents potential
future compilation issues.
Implements several IPC commands in IApplicationFunctions related to GPU error
handling and system events:
- EnableApplicationAllThreadDumpOnCrash (cmd 124)
- SetDelayTimeToAbortOnGpuError (cmd 131)
- TryPopFromNotificationStorageChannel (cmd 151)
- SetHdcpAuthenticationActivated (cmd 170)
- GetLaunchRequiredVersion (cmd 180)
- UpgradeLaunchRequiredVersion (cmd 181)
Also adds the LaunchRequiredVersion struct definition to the header file.
These are currently stubbed implementations that log warnings when called.
REFS: switchbrew.org/wiki/Applet_Manager_services#GetGpuErrorDetectedSystemEvent
Reverts overly restrictive storage buffer validation and size calculation
that was causing rendering issues in The Legend of Zelda: Tears of the
Kingdom, particularly in underground/depth areas. The simplified approach:
- Uses GetMemoryLayoutSize() instead of manual page probing
- Removes unnecessary 4GB memory bounds validation
- Streamlines address translation and alignment handling
This fixes numerous reported cases of missing or corrupted rendering in
TOTK's underground areas where storage buffer operations are heavily used
for depth-related effects.
Implements proper reference counting for binder objects based on the official
documentation. This adds both weak and strong reference counting support to
the IBinder interface and its implementations (BufferQueueProducer and
BufferQueueConsumer).
The implementation follows the documented behavior where:
- type 0 affects weak references
- type 1 affects strong references
- During initialization: {addval=1, type=0} followed by {addval=1, type=1}
- For onFirstRef: {addval=1, type=1}
- For onLastStrongRef: {addval=-1, type=1}
Reference counters are implemented using std::atomic to ensure thread safety.
REFS: switchbrew.org/wiki/Nvnflinger_services#AdjustRefcount
Implements missing functions and improves permission handling in the VI
(Visual Interface) IApplicationDisplayService based on official documentation.
Key changes:
- Add session type enum to properly handle vi:u/vi:s/vi:m permissions
- Implement GetIndirectLayerImageCropMap for handling cropped layer images
- Implement GetDisplayVsyncEventForDebug for debug vsync event handling
- Add proper permission checks for GetSystemDisplayService and GetManagerDisplayService
- Improve AppletResourceUserId validation in OpenLayer
- Clean up logging and error handling
The changes follow the official documentation for permission handling:
- vi:u sessions can only use GetRelayService
- vi:s sessions can use everything except GetManagerDisplayService
- vi:m sessions can use all commands
REFS: switchbrew.org/wiki/Display_services#IApplicationDisplayService
Reorganizes the ErrorModule enum in result.h by grouping error codes into
numerical ranges with descriptive comments. This improves readability and
makes it easier to:
- Find specific modules by their number
- See which numbers are used/unused in each range
- Understand the overall distribution of module numbers
Also standardizes naming conventions across modules and fixes some
inconsistent casing (e.g. FS -> Fs, HDCP -> Hdcp).
REFS: switchbrew.org/w/index.php?title=Error_codes
Updates the SM service implementation to better match the official
"nn::sm::detail::IUserInterface" interface. Key changes include:
- Replace Initialize with RegisterClient command (cmd 0)
- Add DetachClient command implementation (cmd 4)
- Update service name handling to use u64-encoded names
- Add proper PID descriptor handling for RegisterClient/DetachClient
- Add ResultNotAllowed error code
- Update handler registration for both CMIF and TIPC
This brings the implementation closer to the official documentation while
maintaining compatibility with existing code.
Refs: switchbrew.org/wiki/Services_API#sm:
Removes the save states menu and unused help menu items as they require
additional research and implementation work. Specifically:
- Remove save states menu and associated actions (Save/Load)
as proper implementation requires more research
- Remove unused help menu items:
* Open Mods Page
* Open Quickstart Guide
* Open FAQ
- Keep core help functionality (Report Compatibility and About)
- Reorder menu properties for better organization
This change helps maintain a cleaner UI by removing placeholder
features that are not yet ready for implementation.
Refactors the MM (Memory Management) service implementation with improved:
- Session management using a vector of Session objects instead of global vars
- Type safety with proper enums and member encapsulation
- Error handling with consistent patterns
- Modern C++ features (std::erase_if, std::find_if, emplace_back)
- Logging with detailed debug messages
- Code organization and const correctness
Key changes:
- Add Session class with proper encapsulation
- Add EventClearMode enum (Manual = 0, Auto = 1)
- Update Module enum naming for consistency
- Implement proper session tracking and lookup
- Add detailed parameter logging
- Use modern C++ algorithms for session management
The implementation now properly handles multiple sessions and matches
the documented nn::mmnv::IRequest interface more closely.
Refs: switchbrew.org/wiki/Display_services#mm:u
Add proper type definitions and parameter handling for the Memory Management
(mm:u) service based on the Switch documentation:
- Add Module enum for hardware components (CPU, GPU, EMC, etc)
- Add Priority and Setting type definitions as u32
- Add EventClearMode enum for initialization
- Implement proper parameter handling for all IPC calls
- Add detailed logging with parameter values
The Module enum now properly reflects the documented hardware components:
CPU, GPU, EMC, System Bus, Memory Select, and NVIDIA modules (NVDEC,
NVENC, NVJPG).
This makes the implementation match the documented nn::mmnv::IRequest
interface.
Refs: switchbrew.org/wiki/Display_services#mm:u
- Redesign loading screen progress bar with gradient animation
- Update loading screen typography using Segoe UI
- Add comprehensive dark theme styling to main window
- Modernize menu, toolbar, and dock widget appearances
Relaxes validation checks in the NVDRV GPU service and improves error notifier
handling to prevent potential hangs. Key changes:
- Remove strict size validation in SetErrorNotifier
- Relax GPFIFO entry count validation to only check for non-zero values
- Add proper error notifier state tracking in GPU class
- Improve debug logging messages
The previous strict validation was causing issues with some games like ACNH.
These changes maintain necessary checks while being more permissive with
edge cases that don't impact functionality.
Technical changes:
- Store error notifier state in GPU class for future implementation
- Remove upper bound check on GPFIFO entries
- Simplify error notifier setup flow
This should resolve hanging issues while maintaining core functionality.
Implements several previously stubbed functions in the NVDRV service:
- Initialize proper transfer memory handling
- Add error notifier configuration
- Implement channel timeout and timeslice management
- Add object context allocation and tracking
- Add GPU interface stubs for new functionality
The changes improve the accuracy of GPU-related operations while maintaining
compatibility with the existing codebase. All functions now properly validate
parameters and handle endianness correctly using _le types.
Adds UI elements for future save state support:
- New "Save States" menu in the main menubar
- Save and Load action items with keyboard shortcuts
- No functionality implemented yet, just UI stubs
- Add proper invocation info handling for tessellation and fragment stages
- Return patch vertices info shifted by 16 bits for tessellation stages
- Return sample mask shifted by 16 bits for fragment stage
- Return standard format (0x00ff0000) for compute and other stages
- Implement consistently across SPIRV, GLSL, and GLASM backends
- Remove stubbed warning message
- The GetManagerDisplayService function in IApplicationDisplayService is fully implemented, so remove the stubbed warning and change the log level to DEBUG to match its implementation status.
- Updates vcpkg baseline to 7adc2e4d49e8d0efc07a369079faa6bc3dbb90f3 to fix Windows compilation issues by avoiding Visual Studio 2019 build tools and using the latest.
Two main changes in this commit:
1. Replace NVIDIA-specific GL_NV_gpu_shader5 extension with the more widely
supported GL_EXT_shader_explicit_arithmetic_types_float16 in the scaleforce
shader. This improves compatibility across different GPU vendors.
2. Refactor ARM32 exception handling:
- Restructure exception cases for better readability
- Update exception handling to match current Dynarmic API
- Fix indentation in switch statement
- Remove AccessViolation case as it's no longer supported in current API
These changes improve shader compatibility and align the exception handling
with the current Dynarmic implementation.
The SPIRV-Tools and SPIRV-Headers submodules are being temporarily removed
to fix their directory structure. They will be re-added in a follow-up
commit with the correct directory organization.
- Update vcpkg baseline to a42af01b72c28a8e1d7b48107b33e4f286a55ef6
- Add SPIRV-Tools and SPIRV-Headers as submodules
- Update Vulkan-related submodules to latest stable versions
- Improve memory access error handling:
- Add specific handling for null pointer accesses in ARM32 emulation
- Return 0 for null pointer reads instead of undefined behavior
- Silently ignore writes to null pointers
- Add more detailed error messages distinguishing between null pointer
access and other unmapped memory errors
- Treat addresses below 0x1000 as potential null pointer accesses
These changes should provide more graceful handling of null pointer
accesses and improve stability when running games that attempt invalid
memory operations.
Replaces the battery temperature reading implementation with a more
compatible approach using ACTION_BATTERY_CHANGED broadcast intent.
This change provides better backwards compatibility and adds proper
error handling for the temperature reading functionality.
Add stub implementations for previously unhandled flow test conditions in the
shader recompiler's IR emitter. These conditions were previously throwing
"Not Implemented" exceptions when encountered.
The following flow test cases are now stubbed:
- FCSM_TR (Fragment Shader Coarse/Fine Mode Test and Reject)
- CSM_TA (Coarse/Fine Mode Test Accept)
- CSM_TR (Coarse/Fine Mode Test and Reject)
- CSM_MX (Coarse/Fine Mode Maximum)
- FCSM_TA (Fragment Shader Coarse/Fine Mode Test Accept)
- FCSM_MX (Fragment Shader Coarse/Fine Mode Maximum)
Currently these stubs:
1. Return false (ir.Imm1(false)) as a placeholder value
2. Log a warning message indicating the stub
3. Allow shaders using these conditions to compile rather than fail
This is a step toward proper implementation of coarse/fine mode shader
operations. The stubs prevent crashes while making it clear which code paths
need full implementation.
Technical notes:
- Removed the previous FCSM_TR implementation that used flag operations
- Added consistent warning messages for tracking stub usage
- Kept within the existing GetFlowTest switch statement structure
Remove the x86-64 instruction set architecture (ISA) compatibility flags and
associated toolchain file that were setting CPU architecture compatibility
levels. This simplifies the build system by removing the custom ISA flag
handling and x86-64-v2 option.
Changes:
- Remove x86-64 ISA flags configuration block from CMakeLists.txt
- Delete unused x86-64-toolchain.cmake file
- Remove CITRON_USE_X86_64_V2 option
- Reduce compileSdkVersion and targetSdk from 35 to 34
- Change NDK version to 26.1.10909125
- Downgrade Android Gradle Plugin from 8.8.0 to 8.1.2
- Add androidx.constraintlayout dependency
These changes improve compatibility with current Android development
environment and add necessary layout support.
Implements the USE_AUTO_STUB setting in the Android frontend:
- Added USE_AUTO_STUB to BooleanSetting enum
- Added UI switch setting with description in SettingsItem
- Added setting to system settings section in SettingsFragmentPresenter
- Added string resources for setting title and description
The setting allows users to toggle automatic stubbing of missing services
and functions, which may improve compatibility at the cost of stability.
Update VulkanHeaders minimum required version from 1.3.274 to 1.4.304 and
update vcpkg baseline to latest version to ensure compatibility with newer
Vulkan features.
Changes:
- VulkanHeaders: 1.3.274 -> 1.4.304
- vcpkg baseline: c82f74667 -> 7adc2e4d4
Remove the stubbed implementation of FCSM_TR (Forward Condition Set Mode -
Thread Reduction) flow test and replace it with an initial implementation
using SFlag and ZFlag conditions. This provides basic functionality while
allowing for future refinement based on specific shader architecture
requirements.
- Updated the QueryPointerBufferSize function to return the correct u16 pointer buffer size.
- Ensured the function logs its call at the debug level.
- Used IPC::ResponseBuilder to construct the response with the correct buffer size.
This change addresses the stubbed implementation and ensures compliance with the HIPC protocol.
- Added the SetGestureOutputRanges function to the IHidServer class to address the unimplemented function '92' error.
- This fix was discovered through log analysis, which showed a critical assertion failure in the HID service for an unknown function '92'.
- The log indicated a userspace panic and backtrace, pointing to the need for implementing this function to prevent execution breaks.
- Updated CMakeLists.txt to remove specific version requirements for several packages, enhancing flexibility.
- Updated subproject commit references for VulkanMemoryAllocator and vcpkg.
- REF: https://switchbrew.org/wiki/HID_services#ActivateGesture
- Replace emoji thermal indicators with modern progress bar UI
- Switch temperature source to battery sensor for better accuracy
- Adjust temperature thresholds (30°C-45°C range)
- Add automatic Vulkan Validation Layer download for Android
- Downgrade Java/Kotlin target to 17 for wider compatibility
The thermal display now shows a visual progress bar with percentage
instead of emojis, making it easier to gauge system temperature at
a glance. Temperature reading now comes from the battery sensor
which is more reliable across devices.
Build system improvements include automated VVL binary downloads
and installation for Android builds when CITRON_DOWNLOAD_ANDROID_VVL
is enabled. Java target downgraded to 17 to ensure compatibility
with current Android toolchain.
- In commit b3facaa6bb, the copyright header was
updated to include "Citron Homebrew Project" across multiple files, regardless
of whether any contributions were made.
- This commit removes the incorrect attribution and reverts the copyright header
to its previous state.
- Copyright attribution should only be added when meaningful contributions have
been made to the file.
- This commit ensures proper compliance with copyright standards and maintains
correct attribution to the respective contributors.
- Special thanks to Tachi for pointing out the need for these corrections and
ensuring that proper attribution practices are followed.
Expand ISA level enforcement to ensure all components, including vcpkg
dependencies, are built with x86-64-v2 instruction set. This addresses
remaining compatibility issues where dependencies were potentially being
built with higher ISA levels.
Changes:
- Add dedicated x86-64-v2 toolchain file for vcpkg
- Set ISA flags for both main project and dependencies
- Ensure proper quoting of compiler flags
- Configure vcpkg to use consistent toolchain settings
The fix requires cleaning both build and vcpkg directories before
rebuilding:
rm -rf build/
rm -rf vcpkg_installed/
Credits to Alex&Indie for the original ISA compatibility fix.
Fixes remaining instances of Linux Compilation
Enforce x86-64-v2 instruction set level to prevent compatibility issues
on systems that default to higher ISA levels (v3/v4). This fixes crashes
reported on certain Linux distributions like CachyOS that force higher
instruction set levels by default.
The fix:
- Sets -march=x86-64-v2 for both C and CXX flags
- Adds compile options to ensure system defaults don't override
- Explicitly disables v3 and v4 instruction sets
- Only applies to x86_64 architectures
Credits to Alex&Indie for identifying the ISA level compatibility
issue.
Fixes: Linux Compilation.
- Update Kotlin and various AndroidX dependencies to stable versions
- Add temperature monitoring with color-coded display in emulation
- Add FPS color indication (red to green based on performance)
- Add legal disclaimer page to initial setup
- Remove x86_64 ABI filter to focus on arm64-v8a
- Adjust thermal and FPS update intervals for consistency
- Clean up redundant dependency declarations
The temperature display now shows both Celsius and Fahrenheit with
color coding based on safe operating ranges [WIP]. FPS counter provides
visual feedback through colors, making performance issues more
immediately apparent to users.
- Update Gradle from 8.1 to 8.10.2
- Update Android Gradle Plugin from 8.1.2 to 8.8.0
- Update Kotlin from 1.9.20 to 2.1.20-Beta1
- Update various AndroidX dependencies to latest versions
- Update NDK from 26.1 to 27.2 (with RC1/RC2 options commented)
- Update Java target from 17 to 21
- Update Android target SDK from 34 to 35
- Enable additional optimizations in release builds:
- Enable shrinkResources
- Use proguard-android-optimize.txt
- Disable JNI debugging
- Replace vector drawables with PNG for ic_citron
- Comment out unused ComputeInline constant in dma_pusher.cpp
- Update Gradle wrapper and configuration files
This updates the Android build system and dependencies to their latest
versions while enabling additional optimizations for release builds.
The ic_citron icon was converted from vector to PNG format for better
compatibility.
Added new CMake option CITRON_USE_LLVM_DEMANGLE (default: ON) to control whether
the project uses LLVM's Demangle component. This allows building without LLVM
dependencies when demangling support is not needed.
Co-authored-by: reg_server
Previously, the code would unconditionally add a constant buffer descriptor
at index 0 whenever storage buffers were present, which could cause conflicts
and crashes. This change:
- Adds validation to check if constant buffer 0 already exists
- Only adds the descriptor if it's not already present
- Prevents potential descriptor conflicts in shaders
This should resolve crashes in Vulkan games related to invalid descriptor
layouts and resource binding conflicts.
Add conditional compilation directives to handle packed struct definitions
differently between MSVC and other compilers. MSVC uses #pragma pack
while GCC/Clang use __attribute__((packed)). This change affects:
- ZBCColorEntry
- ZBCDepthEntry
- IoctlZbcSetTable
The functionality remains the same, but ensures proper struct packing
across different compiler environments.
Add support for bindless texture constant buffers in the compute pipeline
creation process. When storage buffer descriptors are present, create a
constant buffer descriptor to handle bindless textures. This fixes the
"Failed to track bindless texture constant buffer" error.
Changes:
- Add constant buffer descriptor with index 0 and count 1 when storage
buffers are present
- Place descriptor creation before SPIR-V code generation to ensure proper
shader compilation
This resolves issues with bindless texture access in compute shaders.
Adds support for InfoType::SystemResourceSize (0x1C) which is required for
proper initialization of the Virtual Address Memory Manager (VAMM). This
implementation:
1. Adds SystemResourceSize to the InfoType enum in svc_types.h
2. Implements the GetInfo handler for SystemResourceSize in svc_info.cpp
3. Returns 512MB (0x20000000 bytes) as the system resource size
4. Adds debug logging for the SVC call
The 512MB value is chosen based on typical system resource allocations
needed for VAMM initialization on the Nintendo Switch.
This fixes crashes in games that rely on VAMM functionality, particularly
during nn::os::detail::VammManager::InitializeIfEnabled().
This commit makes several improvements to device memory management and buffer
queue handling:
DeviceMemoryManager:
- Add null pointer and size checks for ReadBlock
- Fill unmapped memory with a known pattern (0xCC) instead of zeros
- Add better error logging for invalid memory accesses
- Add null pointer check for source pointer in memcpy
BufferQueueProducer:
- Improve error handling in WaitForFreeSlotThenRelock
- Add proper abandoned state checking during wait conditions
- Clean up and simplify buffer scanning logic
- Improve logging messages with more descriptive information
- Remove redundant buffer count validation
- Fix potential infinite loop condition during wait
These changes improve stability and error handling while making the code more
maintainable and debuggable. The use of a known pattern for unmapped memory
helps identify uninitialized memory access issues.
Implements TryPopFromFriendInvitationStorageChannel to properly handle
friend invitation data storage and retrieval. This includes:
- Add ResultNoData error code to am_results.h
- Add friend_invitation_storage_channel storage queue to Applet struct
- Implement proper data handling in TryPopFromFriendInvitationStorageChannel
The implementation now properly manages a queue of friend invitation data
and returns appropriate results based on data availability.
Refactors the game list scanning code to use std::filesystem instead of custom
directory iteration functions. Main changes include:
- Replace Common::FS directory iteration with std::filesystem iterators
- Split game file processing logic into separate ProcessGameFile method
- Improve error handling with try-catch for filesystem operations
- Simplify control NCA metadata extraction
- Use more modern C++ features and cleaner code organization
This change should improve maintainability and reliability of the game
scanning system while potentially offering better performance through
native filesystem APIs.
Updates the Discord Rich Presence implementation to use Tinfoil's media
server for game images and improves the overall presentation.
Technical changes:
- Switch to Tinfoil media server for game images
- Add proper title ID handling and display
- Improve error handling for image requests
- Increase network timeout to 10 seconds
- Cache URL to prevent string destruction
- Update Discord client ID
- Clean up code formatting and organization
UI/UX improvements:
- Remove title ID from game state display
- Update default text to be more descriptive
- Improve error logging for failed image fetches
- Maintain image persistence between updates
This change provides better game image support and a cleaner Discord
presence display while improving reliability of the integration.
Replace hardcoded 128-byte alignment with a defined CACHE_LINE_SIZE constant
of 64 bytes for the atomic indices in RingBuffer. This value is more
appropriate for most modern CPU architectures and simplifies the
implementation by using a consistent value regardless of compiler support
for hardware_interference_size.
Changes:
- Add CACHE_LINE_SIZE constant set to 64 bytes
- Use CACHE_LINE_SIZE for atomic index alignment in both code paths
- Remove outdated TODO comment about hardware_destructive_interference_size
- Remove telemetry functionality and related UI elements
- Add automatic token generation using UUID
- Remove manual token verification process
- Sync Citron username with profile username automatically
- Simplify web configuration UI and improve error messages
- Update host room error message for clarity
This change streamlines the web service configuration by removing
unnecessary complexity and automating token management. Users no longer
need to manually verify tokens, and the Citron username is automatically
kept in sync with their profile username.
Resolves a build failure caused by a mismatch between the defined and expected size of the `IoctlZbcSetTable` structure in `nvhost_ctrl_gpu`. The `static_assert` incorrectly expected the size to be 44 bytes, while the actual size was 48 bytes.
Changes include:
- Updated `static_assert` to correctly reflect the 48-byte size of `IoctlZbcSetTable`.
- Verified packing and alignment to ensure compliance with hardware specifications.
- Reviewed and confirmed correctness of `u32` type definitions.
This fix addresses a regression introduced in commit 9be4bf9aa5, which implemented ZBCSetTable functionality, and ensures successful compilation and adherence to the ZBC table implementation's design.
Implements basic Zero Bandwidth Clear (ZBC) table support in nvhost_ctrl_gpu.
This adds storage and validation for both color and depth clear values,
replacing the previous stub implementation. ZBC is a hardware optimization
technique used by NVIDIA GPUs to efficiently handle buffer clearing operations.
Changes include:
- Added ZBC table storage structures
- Implemented parameter validation
- Added separate handling for color and depth modes
- Improved debug logging
- Added documentation explaining ZBC functionality
- Add Memory_10Gb and Memory_12Gb to MemoryLayout enum
- Update memory layout settings to support up to 12GB
- Add SMC enums for 10GB and 12GB memory sizes and arrangements
- Increase MainMemorySizeMax from 8GB to 12GB
- Add memory pool size calculations for 10GB and 12GB configurations
- Update UI translations for new memory options
Added two new audio feature support tags with their corresponding revision
numbers:
- AudioCompressorStatistics (rev 16): For tracking compressor statistics
- AudioVolumeResetSupport (rev 17): For volume reset functionality
These features align with the documented Nintendo Switch audio service
capabilities and maintain compatibility with the existing feature support
system.
2025-01-03 13:34:14 +10:00
3031 changed files with 13302 additions and 4639 deletions
description:A blank issue template for developers only. If you are not a developer, do not use this issue template. Your issue WILL BE CLOSED if you do not use the appropriate issue template.
body:
- type:markdown
attributes:
value:|
**Ifyou are not a developer, do not use this issue template. Your issue WILL BE CLOSED if you do not use the appropriate issue template.**
value:Tech support does not belong here. You should only file an issue here if you think you have experienced an actual bug with yuzu.
- type:checkboxes
attributes:
label:Is there an existing issue for this?
description:Please search to see if an issue already exists for the bug you encountered.
options:
- label:I have searched the existing issues
required:true
- type:input
attributes:
label:Affected Build(s)
description:List the affected build(s) that this issue applies to.
placeholder:Mainline 1234 / Early Access 1234
validations:
required:true
- type:textarea
id:issue-desc
attributes:
label:Description of Issue
description:A brief description of the issue encountered along with any images and/or videos.
validations:
required:true
- type:textarea
id:expected-behavior
attributes:
label:Expected Behavior
description:A brief description of how it is expected to work along with any images and/or videos.
validations:
required:true
- type:textarea
id:reproduction-steps
attributes:
label:Reproduction Steps
description:A brief explanation of how to reproduce this issue. If possible, provide a save file to aid in reproducing the issue.
validations:
required:true
- type:textarea
id:log
attributes:
label:Log File
description:A log file will help our developers to better diagnose and fix the issue. Instructions can be found [here](https://yuzu-emu.org/help/reference/log-files).
about:If you are experiencing an issue with yuzu, and you need tech support, or if you have a general question, try asking in the official yuzu Discord linked here. Piracy is not allowed.
- name:Community forums
url:https://community.citra-emu.org
about:This is an alternative place for tech support, however helpers there are not as active.
@ -14,13 +14,14 @@ Welcome to **Citron**, a cutting-edge Nintendo Homebrew emulator designed to del
## Download 🚀
Ready to experience Citron? [Download the latest version](https://git.citron-emu.org/Citron/Citron/releases) and dive into your favorite Nintendo homebrew titles!
Ready to experience Citron? [Download the latest version](https://git.citron-emu.org/citron/emu/-/releases) and dive into your favorite Nintendo homebrew titles!
## Getting Started 💡
1. **Download and Install**: Head over to the [downloads page](https://git.citron-emu.org/Citron/Citron/releases) to grab the latest release.
2. **Add Homebrew Games**: Citron is built to play homebrew games. Add them to your game directory and enjoy!
3. **Configure Your Settings**: Customize your emulator settings to suit your performance needs.
1. **Check the System Requirements**: Head over to this link to check the requirements to run this emulator [system requirements page](https://evilperson1337.notion.site/Hardware-Requirements-1d957c2edaf680418e2bf2c7239170ce)
2. **Download and Install**: Head over to the [downloads page](https://git.citron-emu.org/citron/emu/-/releases) to grab the latest release.
3. **Add Homebrew Games**: Citron is built to play homebrew games. Add them to your game directory and enjoy!
4. **Configure Your Settings**: Customize your emulator settings to suit your performance needs.