Commit Graph

27257 Commits

Author SHA1 Message Date
Zephyron
117c467ff3 feat: Add frame generation and enhance UE4 game compatibility
- Add frame generation settings (enabled/disabled, interpolation/extrapolation modes)
- Add frame skipping settings (enabled/disabled, adaptive/fixed modes)
- Implement frame skipping logic with adaptive and fixed modes
- Enhance UE4 crash handling with recovery mechanisms
- Add support for signed and float 32-bit image formats across shader backends
- Update Vulkan Validation Layers to v1.4.321.0
- Fix duplicate frame skipping options in Qt UI
- Improve memory handling for UE4 games (Hogwarts Legacy compatibility)
- Add enhanced bindless texture handling with fallback approach
- Update Android build configuration and dependencies

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-08-05 19:32:28 +10:00
Zephyron
612871f81f Merge branch 'android-applet-settings' into 'master'
android: Add applet mode settings to UI

See merge request citron/rewrite!45
2025-08-05 07:30:49 +00:00
Zephyron
011a546229 android: Add applet mode settings to UI
Add comprehensive applet mode configuration options to the Android settings
interface. This includes settings for all major applets:

- Cabinet applet mode
- Controller applet mode
- Data Erase applet mode
- Error applet mode
- Network Connect applet mode
- Player Select applet mode
- Software Keyboard applet mode
- Mii Edit applet mode
- Web applet mode
- Shop applet mode
- Photo Viewer applet mode
- Offline Web applet mode
- Login Share applet mode
- WiFi Web Auth applet mode
- My Page applet mode

Each setting allows users to choose between HLE (High-Level Emulation)
and LLE (Low-Level Emulation) modes for individual applets, providing
granular control over applet emulation behavior.

Changes:
- Add applet mode settings to IntSetting enum
- Add corresponding string resources for all applet settings
- Add applet mode choice arrays (HLE/LLE options)
- Add applet settings section to SettingsItem mapping
- Add applet settings header and all applet mode settings to
  SettingsFragmentPresenter

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-08-05 17:29:45 +10:00
Zephyron
45daff11c9 feat(audio): Fix OpenAL auto detection
This commit addresses serveral bugs within the audio service where OpenAL would fail to register the output device to the mapped engine.

- Increase null safety checks for all audio backends (cubeb, sdl2, openal)
- Added failsafe for Device selection

These ensure the audio_renderer can validate calls from the OpenAL engine, Credits to Hayate Yoshida for helping Identify the issue.

Credit: Hayate Yoshida <hayate_yoshida@citron-emu.org>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-08-02 20:36:40 +10:00
Zephyron
b8039b4b2e Merge branch 'Citron-AppImage-Builder' into 'master'
feat: Added Torzu's AppImageBuilder

See merge request citron/rewrite!44
2025-07-31 08:51:53 +00:00
Boss.sfc
317a8b2bd5 feat: Added Torzu's AppImageBuilder
Added support for building AppImages using Torzu's AppImageBuilder.

Signed-off-by: Boss.sfc <boss.sfc@citron-emu.org>
2025-07-31 14:40:22 +07:00
Zephyron
c5dce33345 Merge branch 'fsr2-implementation' into 'master'
feat: Add FSR 2.0 scaling filter option

See merge request citron/rewrite!43
2025-07-29 05:50:13 +00:00
Zephyron
568999fd59 feat: Improve FSR2 UI with dropdown quality mode and conditional FSR sharpness
- Convert FSR2 quality mode from number input to dropdown with 4 options
- Disable and grey out FSR sharpness slider when FSR2 is selected
- Add proper enum-based settings for FSR2 quality modes
- Update both Vulkan and OpenGL FSR2 implementations
- Connect UI state changes automatically

Provides better UX by using appropriate controls and preventing confusion
between FSR 1.0 and FSR 2.0 sharpening options.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-29 15:49:05 +10:00
Zephyron
3b8da3d80a feat: Add FSR 2.0 scaling filter option
- Add FSR2 to ScalingFilter enum alongside existing FSR
- Implement FSR2 classes for both Vulkan and OpenGL renderers
- Add fsr2_quality_mode setting with 4 quality levels (Quality, Balanced, Performance, Ultra Performance)
- Integrate FSR2 into present pipeline for both renderers
- Add UI support for FSR2 option in scaling filter dropdown
- Add FSR2 quality mode setting with dropdown selection
- Update translations and Android strings for new options
- Default to Performance mode for optimal balance

This provides users with FSR 2.0 as a scaling option, offering different
quality/performance characteristics compared to FSR 1.0. The implementation
uses quality-based sharpening values and integrates seamlessly with the
existing rendering pipeline.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-29 15:21:36 +10:00
Zephyron
d38b58ca77 Merge branch 'performance-overlay-enhancements' into 'master'
feat: enhance performance overlay with frame graph and draggable UI

See merge request citron/rewrite!42
2025-07-27 10:52:07 +00:00
Zephyron
93a48ad682 feat: enhance performance overlay with frame graph and draggable UI
- Add real-time frame time graph with min/avg/max statistics
- Implement draggable overlay functionality with cursor feedback
- Modernize UI with Material Design colors and improved typography
- Fix crash issues by throttling performance data updates
- Ensure FPS and frame time consistency
- Add proper error handling and validation
- Increase overlay size to accommodate new graph feature

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-27 20:50:57 +10:00
Zephyron
1e691bbbb2 Merge branch 'CachyOS-LTO-Fix' into 'master'
fix: CachyOS LTO Compilation

See merge request citron/rewrite!41
2025-07-27 05:34:36 +00:00
Zephyron
af0deddb19 Merge branch 'citron-icns-change' into 'master'
chore: update Yuzu logo to Citron in .icns file

See merge request citron/rewrite!40
2025-07-24 09:08:25 +00:00
Boss.sfc
04c2e3b212 chore: update Yuzu logo to Citron in .icns file
Replaced the Yuzu logo with the new Citron branding in the macOS .icns file used for the application icon. This change aligns with the project's rebranding from Yuzu to Citron and ensures consistent visual identity across platforms. No functional changes to the application.

Signed-off-by: Boss.sfc <boss.sfc@citron-emu.org>
2025-07-23 18:58:43 +07:00
Boss.sfc
fc480dcb69 fix: CachyOS LTO Compilation
Fix LTO linking issues on CachyOS with GCC 15.x

- Add LTO support to all core library targets (input_common, frontend_common,
  network, shader_recompiler, web_service) that were missing LTO configuration
- Create citron_configure_lto() helper function for consistent LTO handling
- Implement CachyOS-specific detection via /etc/os-release and kernel version
- Apply conservative LTO flags (-flto=auto -ffat-lto-objects) only for
  CachyOS + GCC 15+ to resolve linking errors with newer toolchains
- Other distributions continue using aggressive LTO settings for maximum performance
- Disable LTO on executable targets to prevent main function optimization issues

This resolves "undefined symbol" errors when building with -DCITRON_ENABLE_LTO=ON
on CachyOS while maintaining optimal LTO performance on other distributions.

Fixes linking errors including:
- Core::Frontend::EmuWindow symbols
- Core::System methods
- Settings::values
- Common logging functions

Tested on CachyOS with GCC 15.1.1 + LLD 20.1.8

Signed-off-by: Boss.sfc <boss.sfc@citron-emu.org>
2025-07-22 21:37:37 +07:00
Zephyron
d0ae8f1582 docs: rewrite README for homebrew focus and update repository paths
- Replace citron/emu with citron/rewrite in all URLs
- Add comprehensive legal disclaimers for homebrew-only use
- Update content to emphasize legal software and developer respect
- Modernize formatting with emojis and improved structure
- Add new sections for getting started, contributing, and contact info
- Focus messaging on homebrew development and legal use cases

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-22 17:36:15 +10:00
Zephyron
eb4512e9de Merge branch 'CachyOS-compiling-fix' into 'master'
fix: Compiling for CachyOS

See merge request citron/rewrite!39
2025-07-22 06:34:51 +00:00
Zephyron
04c17586d4 Merge branch 'high-dpi-settings-menu' into 'master'
frontend: Improve High DPI support and scaling

See merge request citron/rewrite!38
2025-07-22 06:31:13 +00:00
Zephyron
f5bea18fd9 frontend: Improve High DPI support and scaling
This patch enhances High DPI support across the Qt frontend with the following improvements:

**Windows DPI Awareness:**
- Add shellscalingapi.h include for Windows DPI functions
- Implement Per Monitor DPI Awareness (Windows 8.1+) and Per Monitor v2 DPI Awareness (Windows 10+)
- Use SetProcessDPIAware() and SetProcessDpiAwareness() for better multi-monitor scaling
- Dynamically load shcore.dll to access modern DPI awareness APIs

**Configuration Dialog Enhancements:**
- Add comprehensive High DPI responsive CSS media queries for different DPI levels (192dpi, 240dpi)
- Scale UI elements (buttons, comboboxes, line edits, checkboxes, radio buttons) based on screen DPI
- Improve scroll area styling with proper scrollbar theming for high DPI displays
- Set proper window attributes for scaling (WA_TranslucentBackground, WA_NoSystemBackground)
- Calculate logical window size based on device pixel ratio for accurate scaling

**UI Improvements:**
- Enhanced scroll area styling with custom scrollbar appearance
- Better visual feedback with hover effects on scrollbar handles
- Improved spacing and sizing for high DPI displays
- Set proper window modality and title for configuration dialog

These changes provide better visual quality and usability on high DPI displays, particularly on Windows systems with multiple monitors or high-resolution screens. The scaling is now more accurate and consistent across different display configurations.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-22 16:30:47 +10:00
Boss.sfc
e02ba8b5bf fix: Compiling for CachyOS
- Made CreateScrollArea function static to limit its linkage to the current translation unit.

Signed-off-by: Boss.sfc <boss.sfc@citron-emu.org>
2025-07-22 13:29:16 +07:00
Zephyron
bd6dd7f0ff Merge branch 'controller-crash-grid-view-memory-leak' into 'master'
fix: Prevent controller crashes and memory leaks in game list grid view

See merge request citron/rewrite!36
2025-07-21 11:25:01 +00:00
Zephyron
0d05f64e79 fix: Prevent controller crashes and memory leaks in game list grid view
- Fix memory leak in PopulateGridView() and FilterGridView() by properly
  deleting old QStandardItemModel instances before creating new ones
- Add safety checks in controller navigation to prevent crashes when
  accessing uninitialized controller data
- Improve controller input handling to only send events to visible and
  properly initialized views
- Add null pointer checks in SetViewMode() to prevent crashes when
  setting current index on empty models
- Add proper cleanup in GameList destructor to prevent memory leaks
  on application shutdown

The main issue was that switching between list and grid views created
new models without properly cleaning up old ones, leading to memory
leaks. Additionally, controller navigation would send keyboard events
to both views simultaneously, causing crashes when one view was not
properly initialized or visible.

Fixes crashes when using controller navigation in grid view mode.

Thanks to Beta Testers acarajé & Hayate Yoshida (吉田 疾風) for finding the bug.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-21 21:23:51 +10:00
Zephyron
c7bc05f1d0 Merge branch 'macOS-compilation-fix' into 'master'
fix: Resolve compilation issues with fmt library and formatters

See merge request citron/rewrite!35
2025-07-16 05:45:22 +00:00
Zephyron
2e5f8c8e8d Merge branch 'cpp20-concepts-file-open' into 'master'
fix: constrain file.h Open templates with C++20 concepts

See merge request citron/rewrite!34
2025-07-16 05:42:11 +00:00
Zephyron
97490b0586 fix: constrain file.h Open templates with C++20 concepts
Add HasValueType concept to prevent compilation errors when using raw
pointers like const char* with Open() templates. The templates now only
participate in overload resolution for types that have a value_type
member (e.g., std::string, std::filesystem::path).

Fixes C2039 and C2651 errors on Windows builds.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-16 15:41:41 +10:00
Boss.sfc
0fb39034c1 fix: Resolve compilation issues with fmt library and formatters
Fix multiple compilation errors preventing successful build:

* Add const qualifier to custom fmt formatter functions across codebase
  - Updated formatters in logging, shader recompiler, texture cache, and other modules
  - Ensures compatibility with newer fmt library versions

* Add missing fmt/ranges.h includes for fmt::join usage
  - Fixed fmt::join calls in Vulkan renderer, GDB stub, NFC service, and main window
  - Resolves "no member named 'join' in namespace 'fmt'" errors

* Exclude unsupported platforms from Boost.Process usage in debugger
  - Extended conditional compilation to avoid Boost.Process where unavailable

* Fix type casting issues in AOC service manager
  - Resolved std::min type mismatch with explicit casting
2025-07-16 11:11:33 +07:00
Zephyron
25e8c0539c updater: Improve version detection with build system fallback
Add build system version detection as a fallback in GetCurrentVersion():
- Include common/scm_rev.h to access build version information
- Use Common::g_build_version when version.txt doesn't exist
- Automatically create version.txt with build version for future use
- Update comments to clarify version resolution priority

This ensures the updater can properly detect the current application
version even when version.txt hasn't been created yet, while maintaining
the existing priority system for version detection.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-12 09:23:29 +10:00
Zephyron
00c3e7aea5 fix: Implement two-stage update system to handle file-in-use errors
Replace direct file overwriting with a staging-based update mechanism to
resolve "file in use" errors during self-updates.

**Changes:**
- Stage updates to temporary directory instead of direct installation
- Apply staged updates on next application startup (before files are loaded)
- Add static methods for startup update detection and application
- Create update manifest to track staged update metadata
- Backup existing files before applying updates
- Update UI messaging to reflect staged update workflow

**Problem solved:**
The previous direct file replacement approach failed when trying to overwrite
DLLs and executables that were loaded into memory by the running process.
This two-stage approach stages files safely, then applies them on restart
when no files are in use.

**Workflow:**
1. Download and extract update to staging directory
2. Create manifest with update metadata
3. Show "Update ready" message to user
4. On next app startup: detect staged update, apply it, show success message
5. Clean up staging directory after successful application

This ensures reliable self-updates without file access conflicts.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-11 17:01:37 +10:00
Zephyron
5472256a2d Merge branch 'auto-updater-system' into 'master'
feat: Add automatic update system with background checking

See merge request citron/rewrite!33
2025-07-11 06:23:00 +00:00
Zephyron
9ef1c76a2c feat: Add automatic update system with background checking
Implement a complete auto-updater system for Citron with the following features:

- Add UpdaterService class for handling update checks, downloads, and installations
- Add UpdaterDialog with progress tracking and user interaction
- Support both .zip and .7z archives with Windows PowerShell fallback
- Automatic background update checking on startup (3-second delay)
- Silent notifications when updates are available
- Manual "Check for Updates" menu option in Help menu
- User setting to enable/disable automatic update checks (enabled by default)
- Graceful error handling with detailed logging
- Restart functionality after successful updates
- Libarchive integration for cross-platform archive support

The system uses HTTP URLs to bypass SSL library compatibility issues and
provides a smooth user experience with minimal interruption during automatic
checks. Manual updates show a full dialog with progress tracking and changelog
information.

Fixes update distribution workflow and keeps users informed of new releases.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-11 16:22:28 +10:00
Zephyron
ab26698b4e Merge branch 'audio-add-new-functions-services' into 'master'
audio: Implement missing audio services and functions

See merge request citron/rewrite!32
2025-07-10 08:03:25 +00:00
Zephyron
eb4da7a78c audio: Implement missing audio services and functions
New Services Added:
- auddev (IAudioSnoopManager) - Audio development/debugging service [6.0.0+]
  * EnableDspUsageMeasurement/GetDspStatistics with firmware version switching
  * DisableDspUsageMeasurement/GetAppletStateSummaries with firmware version switching
  * SetDspStatisticsParameter/GetDspStatisticsParameter [20.0.0+]
  * GetDspUsage [6.0.0-16.1.0]

- aud:a (IAudioSystemManagerForApplet) - System audio manager for applets [11.0.0+]
  * Applet resource user ID registration/management
  * Audio suspend/resume functionality
  * Per-applet volume controls (output/input/record)
  * GetAppletStateSummaries [18.0.0-19.0.1]

- aud:d (IAudioSystemManagerForDebugger) - System audio manager for debugging [11.0.0+]
  * RequestSuspendAudioForDebug/RequestResumeAudioForDebug

Enhanced Existing Services:
- audctl (IAudioController) - Added missing [19.0.0+] functions:
  * OverrideDefaultTargetForDebug [19.0.0-19.0.1]
  * SetForceOverrideExternalDeviceNameForDebug [19.0.0+]
  * ClearForceOverrideExternalDeviceNameForDebug [19.0.0+]
  * Fixed GetSystemInformationForDebug buffer handling

- IAudioDevice - Added missing [17.0.0+] and [18.0.0+] functions:
  * AcquireAudioInputDeviceNotification/ReleaseAudioInputDeviceNotification [17.0.0+]
  * AcquireAudioOutputDeviceNotification/ReleaseAudioOutputDeviceNotification [17.0.0+]
  * SetAudioDeviceOutputVolumeAutoTuneEnabled/IsAudioDeviceOutputVolumeAutoTuneEnabled [18.0.0+]

Technical Changes:
- Updated service registration in audio.cpp to replace placeholder services
- Added proper CMIF buffer handling with std::array<u8, SIZE> for InLargeData/OutLargeData
- Added firmware version annotations matching switchbrew documentation
- Implemented proper state management for all new services
- Added comprehensive error handling and logging

This implementation provides complete audio service coverage including the specifically requested GetDspStatisticsParameter function and numerous other missing functions that games expect to be available.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-10 18:00:59 +10:00
Zephyron
d709c878bc Merge branch 'bcat-add-new-functions-services' into 'master'
core/hle/service/bcat: Fix compilation errors and implement missing services

See merge request citron/rewrite!31
2025-07-05 13:16:14 +00:00
Zephyron
99cff6cb9c core/hle/service/bcat: Fix compilation errors and implement missing services
- Fix CMIF serialization alignment error in RequestSyncDeliveryCacheWithApplicationIdAndDirectoryName by reordering parameters (DirectoryName before u64)
- Implement missing INotifierService and IDeliveryTaskSuspensionService classes with proper kernel event handling
- Add missing source files to CMakeLists.txt to resolve linker errors
- Update IServiceCreator to properly implement CreateDeliveryCacheProgressService methods instead of leaving them stubbed
- Add ProgressServiceBackend support to IServiceCreator with proper friend class access
- Fix kernel event creation by using KernelHelpers::ServiceContext instead of direct system calls
- Add proper includes for kernel_helpers.h and event management

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-05 23:12:39 +10:00
Zephyron
f1ba9df80a Merge branch 'glue-add-new-functions-services' into 'master'
hle/service: Implement missing Glue services for 20.0.0+ support

See merge request citron/rewrite!30
2025-07-01 10:09:20 +00:00
Zephyron
98d0c627e6 hle/service: Implement missing Glue services for 20.0.0+ support
- **ARP Service (arp:r/arp:w)**: Added 20.0.0+ function support
  * arp:r: GetApplicationInstanceUnregistrationNotifier, ListApplicationInstanceId,
    GetMicroApplicationInstanceId, GetApplicationCertificate, GetPreomiaApplicationLaunchProperty,
    GetPreomiaApplicationControlProperty
  * arp:w: AcquireApplicationProcessPropertyUpdater, AcquireApplicationCertificateUpdater,
    RegisterApplicationControlProperty
  * Added interface classes: IUnregistrationNotifier, IApplicationProcessPropertyUpdater,
    IApplicationCertificateUpdater

- **Platform Service Manager (pl:u)**: Added Switch 2 [S2] functions
  * Commands 2010, 2020, 2100 (Unknown2010, Unknown2020, OpenFont)

- **ECTX Service**: Added missing ectx:r service implementation
  * Registered ectx:r service alongside existing ectx:aw

- All functions properly stubbed
- Fixed PushIpcInterface usage with shared_ptr
- Command mappings follow switchbrew.org documentation
- Ensures compatibility with 20.0.0+ system versions

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-01 20:06:45 +10:00
Zephyron
fd6f3c0418 Merge branch 'am-add-new-functions-services' into 'master'
core/hle: Implement all missing AM (Applet Manager) service functions

See merge request citron/rewrite!29
2025-07-01 07:54:43 +00:00
Zephyron
2776962067 core/hle: Implement all missing AM (Applet Manager) service functions
Add complete implementation of missing functions and services from the Applet Manager services documentation, including 20.0.0+ functions.

Changes:
- IApplicationFunctions: Add functions 210-999 including 20.0.0+ function 460
  * GetLaunchRequiredVersionUpgrade, RequestToLaunchApplication
  * DeclareApplicationAlive, GetApplicationControlProperty
  * CreateApplicationResourceUsageSystemReportForDebug, etc.

- IHomeMenuFunctions: Add functions 300-910
  * RebootSystem, LaunchApplication, GetAppletLaunchedHistory
  * TakeScreenShotOfOwnLayerEx, CreateFloatingLibraryApplet, etc.

- IGlobalStateController: Add functions 50-400
  * VR mode functions, wireless priority mode, system button history
  * Operation mode changes, sleep/wake functionality, etc.

- ISelfController: Add functions 140-950
  * Recording functions, CPU boost, performance configuration
  * Migration services, album accessors, etc.

- ICommonStateGetter: Add functions 600-1063
  * Save data functions, cache storage, GPU error detection
  * Capture image functions, HDCP authentication, etc.

- Create new service classes:
  * IOverlayAppletProxy with IOverlayAppletFunctions
  * ISystemApplicationProxy for system applications

- Fix IAllSystemAppletProxiesService stub implementations:
  * OpenOverlayAppletProxy, OpenSystemApplicationProxy
  * CreateSelfLibraryAppletCreatorForDevelop, GetDebugFunctions

All functions are appropriately implemented. Functions without descriptions return stub implementations. Includes all 20.0.0+ functions from switchbrew documentation.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-01 17:54:07 +10:00
Zephyron
e2e35d1af6 Merge branch 'tma-add-new-functions-services' into 'master'
core/hle: Implement TMA (Target Manager Agent) service

See merge request citron/rewrite!28
2025-07-01 06:27:59 +00:00
Zephyron
04b0624930 core/hle: Implement TMA (Target Manager Agent) service
Add implementation for the TMA service which provides file I/O
and debugging functionality for development tools.

Changes:
- Add TMA service with IFileManager, IFileAccessor, and IDirectoryAccessor
- Implement stubbed file operations (ReadFile, WriteFile, GetFileSize, etc.)
- Implement stubbed directory operations (ReadDirectory, GetEntryCount, etc.)
- Add TMA logging category for service debugging
- Fix parameter alignment in ReadFile function signature

All functions are provided as-is to allow games and development tools to initialize
without errors.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-01 16:25:30 +10:00
Zephyron
312de1beca Merge branch 'fsp-add-new-functions-services' into 'master'
fs: Implement missing filesystem functions and interfaces

See merge request citron/rewrite!27
2025-06-30 09:26:35 +00:00
Zephyron
90f265837d fs: Implement missing filesystem functions and interfaces
- Add IDeviceOperator interface with 49 functions for SD card, MMC, and game card operations
- Add IEventNotifier interface for filesystem event notifications
- Add ISaveDataTransferManager and related transfer interfaces (exporter/importer)
- Add IWiper interface for BIS partition wiping
- Enhance FSP_SRV with OpenDeviceOperator, OpenSdCardDetectionEventNotifier, OpenSaveDataTransferManager, and other missing functions
- Enhance FSP_LDR with OpenCodeFileSystem, IsArchivedProgram, and SetCurrentProcess implementations
- Enhance FSP_PR with RegisterProgram, UnregisterProgram, and verification functions
- Fix ServiceContext usage for proper event creation and management
- Fix function parameter alignment issues for CMIF serialization
- Update build system to include new source files
- Update copyright headers to 2025 citron

All functions are implemented with appropriate logging and parameter validation based on Nintendo Switch filesystem services documentation.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-06-30 19:24:23 +10:00
Zephyron
7f5661440a Merge branch 'sockets-add-new-functions-services' into 'master'
core/sockets: Add missing socket services and functions from switchbrew

See merge request citron/rewrite!26
2025-06-30 08:02:01 +00:00
Zephyron
90dc2df21a core/sockets: Add missing socket services and functions from switchbrew
- Add Unknown39 and Unknown40 functions to BSD service for [20.0.0+]
- Implement bsd:nu service with ISfUserService and ISfAssignedNetworkInterfaceService
- Add dns:priv and ethc:c/ethc:i service stubs
- Update CMakeLists.txt to include new socket service files
- All new functions include basic stub implementations following existing patterns

This completes the socket services implementation based on switchbrew.org documentation.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-06-29 16:57:26 +10:00
Zephyron
ed6d170c3b Merge branch 'hid-add-new-functions-services' into 'master'
hid: Implement missing HID service functions and stubs

See merge request citron/rewrite!25
2025-06-29 05:57:14 +00:00
Zephyron
04dfb8914f hid: Complete HID service implementation with all switchbrew functions
- Add all missing function declarations and implementations for HID server
- Implement functions from 15.0.0+ through 20.0.1+ firmware versions
- Add proper command buffer IDs matching switchbrew documentation:
  * 1010: SetForceSixAxisSensorFusedParameters [15.0.0+]
  * 1011: GetForceSixAxisSensorFusedParameters [15.0.0+]
  * 1012: GetFirmwareVersionStringForUserSupportPage [20.0.0+]
  * 1420: GetAppletResourceProperty [19.0.0+]
  * 533: SetPalmaDisallowedActiveApplications [20.0.0+]
  * 410: GetNpadOfHighestBatteryLevelForJoyLeft
- Add comprehensive Unknown function stubs for gaps in documentation
- Update HID debug server with missing functions and fix duplicate entries
- Organize functions by firmware version with proper comments
- Update firmware version string to realistic Atmosphere 1.9.1 + NX 20.1.5
- Fix GetResourceManager to use Initialize() instead of UpdateControllers()
- Ensure all functions have proper stub implementations with logging

This brings Citron's HID service implementation to full parity with the
official Nintendo Switch HID service as documented on switchbrew.org.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-06-29 15:55:54 +10:00
Zephyron
407c656f69 hid: Implement missing HID service functions and stubs
Add implementations for previously unimplemented HID functions:

* Accelerometer parameter functions (73-78):
  - SetAccelerometerParameters, GetAccelerometerParameters, ResetAccelerometerParameters
  - SetAccelerometerPlayMode, GetAccelerometerPlayMode, ResetAccelerometerPlayMode

* Six-axis sensor calibration (86):
  - StoreSixAxisSensorCalibrationParameter

* Seven six-axis sensor fusion strength (308-309):
  - SetSevenSixAxisSensorFusionStrength, GetSevenSixAxisSensorFusionStrength

* USB Full Key Controller and battery functions (401-408):
  - EnableUsbFullKeyController, IsUsbFullKeyControllerConnected
  - HasBattery, HasLeftRightBattery
  - GetNpadInterfaceType, GetNpadLeftRightInterfaceType
  - GetNpadOfHighestBatteryLevel, GetNpadOfHighestBatteryLevelForJoyRight

* Digitizer activation (2000):
  - ActivateDigitizer

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-06-28 20:33:39 +10:00
Zephyron
cdcda1fa5b feat(core): Update HOS and NintendoSDK version constants
- Bumps HOS version from 20.1.1 to 20.1.5
- Updates the corresponding `VERSION_HASH`, `DISPLAY_VERSION`, and
  `DISPLAY_TITLE` strings.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-06-28 19:55:42 +10:00
Zephyron
9e49ff3897 Revert "audio_core: Improve audio renderer compatibility and error handling"
This reverts commit c8aeab799d.
2025-06-23 19:15:09 +10:00
Zephyron
39ed0afa1f Revert "Implement IApplicationFunctions function 210 (RequestToAcquireUserUsedMemory)"
This reverts commit 1471d150d0.
2025-06-23 19:14:23 +10:00