summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-02-09Replace yuzu identifiers with citronZephyron
Update magic numbers and default identifiers across codebase: - UUID default value - Thread magic number - Amiibo name - Vulkan cache magic number - Shader cache magic number
2025-02-09service/nvdrv: Implement NVGPU_GPU_IOCTL_NUM_VSMSZephyron
- Add IoctlNumVsms struct definition - Implement ioctl 0x13 to return number of SM units (2 for Tegra X1)
2025-02-09service/friend: Clean up friend service implementationZephyron
- Remove unused function stubs - Improve GetCompletionEvent implementation - Clean up response builder naming
2025-02-09service/audio: Clean up audio controller implementationZephyron
- Remove Unknown5000 function and related debug commands - Fix incorrect service name in log message
2025-02-09service/acc: Clean up account service implementationZephyron
- Remove unused function stubs - Add version information comments - Add clang-format markers - Remove duplicate TrySelectUserWithoutInteraction function - Fix formatting and code style
2025-02-08service/friend: implement additional friend service functionsZephyron
- 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.
2025-02-08service/audio: implement Unknown5000 and add debug commandsZephyron
- 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-02-08service/nim: implement CreateServerInterface2 and improve loggingZephyron
- 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.
2025-02-08service/mm: add missing vector include and update copyrightZephyron
- 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.
2025-02-08service/acc: implement Nintendo Account integration and cleanupZephyron
- 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.
2025-02-08service/nifm: implement additional network interface functionsZephyron
- 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.
2025-02-08service/sm: improve service manager implementationZephyron
- 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.
2025-02-08service/set: improve settings handling and update serial numberZephyron
- 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.
2025-02-08service/hid: reorganize gesture-related functionsZephyron
- 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.
2025-02-08service: fix typo in NPNS GetStateChangeEvent function nameZephyron
Fix spelling of "GetStateChangeEvent" function name in both INpnsSystem and INpnsUser interfaces. The function was incorrectly spelled as "GetStateChangeEVent" with a capital 'V'.
2025-02-08android: optimize build settings and remove x86_64 supportZephyron
- 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.
2025-02-08common: improve host memory mapping validationZephyron
- Add maximum memory size limit of 512GB (Overkill) - Implement additional safety checks for memory mapping: * Validate non-zero addresses * Verify address alignment * Add length validation against maximum size - Remove redundant assertion for host_offset alignment - Remove potentially problematic mapping verification - Improve error logging for invalid mapping attempts These changes enhance memory safety by adding proper bounds checking and validation before performing memory mappings, while removing a potentially problematic post-mapping verification step.
2025-02-08core: improve nvdrv and buffer queue implementationsZephyron
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.
2025-02-08sockets: reorder errno values numericallyZephyron
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.
2025-02-08audio: refactor SDL2 sink implementationZephyron
- 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.
2025-02-05frontend: Remove telemetry popup and default to disabledZephyron
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.
2025-02-04discord: Increase game icon resolution to 256x256Zephyron
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.
2025-02-04audio_core/renderer: Add compressor and splitter support for Rev13Zephyron
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.
2025-02-04api_version: Update Atmosphere version and add citron copyrightZephyron
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.
2025-02-04vulkan: Add Samsung driver workaroundsZephyron
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-02-04Restore original Citra copyright dates in SPDX headersZephyron
Update SPDX copyright headers to restore original 2014 Citra Emulator Project attribution, replacing incorrect 2025 Citron references in: - bootmanager.cpp - configure_touch_from_button.cpp - game_list.cpp - main.cpp
2025-02-03video_core/vulkan: Improve texture format conversion handlingZephyron
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-02-03kernel/svc: Refactor UnmapProcessCodeMemory validationZephyron
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.
2025-02-03android: Reorganize and categorize gradle dependenciesZephyron
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.
2025-02-03memory: Improve debug logging and validation in InvalidateNCEZephyron
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.
2025-02-02vulkan: Implement native MSAA resolve in texture cacheZephyron
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.
2025-02-02Remove firmware decryption warning dialogZephyron
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.
2025-02-02vulkan: Add 4KB memory alignment for AMD and Qualcomm driversZephyron
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)
2025-02-02vulkan: Fix parameter naming consistency for Android compilationZephyron
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.
2025-02-01video_core: Add new shader format conversion pipelinesZephyron
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-02-01common/nvdrv: improve memory validation and error handlingZephyron
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.
2025-02-01common: add missing <memory> include in common_types.hZephyron
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.
2025-02-01nvdrv: Add GetTpcMasks2 support and improve memory mapping validationZephyron
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.
2025-02-01feat: Add RAM usage overlay and improve thermal displayZephyron
- 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.
2025-02-01video_core: Add sRGB to D24S8 depth-stencil conversion supportZephyron
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.
2025-02-01string_util: Replace deprecated wstring_convert with direct UTF conversionsZephyron
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.
2025-02-01common: Improve error handling in host memory managementZephyron
Add proper error handling and recovery mechanisms for memory mapping operations instead of using assertions.
2025-02-01Android: Update build configuration for Android 15Zephyron
Update build configuration to support Android 15 (API 35) devices and optimize build settings for better compatibility.
2025-01-30service: Implement rebootless system update stubs and typesZephyron
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.
2025-01-30android: Fix non-scrollable legal disclaimer on setupvampiric_x
2025-01-29kernel/svc: Implement InitialProcessIdRange and improve process exit handlingZephyron
- 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.
2025-01-28ui: Update repository URLs to git.citron-emu.orgZephyron
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.
2025-01-28network: Add NOMEM errno handling for socket operationsZephyron
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.
2025-01-27qt: Replace deprecated stateChanged with checkStateChangedZephyron
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.
2025-01-27vulkan: Relax VRAM allocation limits for better stabilityZephyron
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.