Commit Graph

2126 Commits

Author SHA1 Message Date
collecting
19a5cde299 feat: Add Lanczos 2025-10-06 02:14:33 +00:00
collecting
0408e26e4c feat: Add Lanczos 2025-10-06 02:03:36 +00:00
Zephyron
44057a1b2b Merge branch 'wayland_flag' into 'main'
create: Flag for UI Layer

See merge request citron/emulator!60
2025-10-01 22:16:53 +10:00
Zephyron
9090a24c2e feat: add Low GPU Accuracy setting for maximum performance
Implements a new "Low" GPU accuracy level that prioritizes performance
over accuracy by aggressively cutting corners in GPU emulation.

Changes:
- Add GpuAccuracy::Low enum and setting infrastructure
- Implement IsGPULevelNormal() helper function
- Skip texture cache checks and query operations
- Use unsafe memory reads for DMA operations
- Disable fence delays and query precision
- Add UI support for desktop (Qt) and Android

Performance optimizations:
- Skips texture cache coherency checks (vk/gl_rasterizer.cpp)
- Non-blocking query synchronization (query_cache.h)
- Unsafe memory operations (dma_pusher.cpp)
- No macro parameter refresh (maxwell_3d.cpp)
- Immediate fence signaling (fence_manager.h)
- Non-precise Vulkan queries (vk_query_cache.cpp)

Ideal for lower-end hardware and users prioritizing FPS over accuracy.
Works on both desktop and Android platforms.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-01 21:45:23 +10:00
collecting
fe9683356b fix: wayland_flag 2025-09-29 04:45:47 +00:00
collecting
73b2ac113e create: Flag for UI Layer 2025-09-29 04:06:31 +00:00
Zephyron
274b027668 fix: allow Insane VRAM mode persistence
- Update VRAM setting max value from HighEnd to Insane
- Add TAA translation for UI
- Fixes issue where Insane VRAM reverts to HighEnd

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-27 11:48:01 +10:00
collecting
be70def422 #define STBI_NO_SIMD 2025-09-23 05:01:27 +00:00
collecting
c433436e8d #define STBI_NO_SIMD 2025-09-23 04:55:23 +00:00
Zephyron
19cf31b215 feat: add Temporal Anti-Aliasing (TAA) support for OpenGL and Vulkan
- Add TAA option to AntiAliasing enum in settings
- Implement TAA shaders for both OpenGL (GLSL) and Vulkan (SPIR-V)
- Add OpenGL TAA class with framebuffer management and temporal blending
- Add Vulkan TAA class following existing AntiAliasPass architecture
- Integrate TAA into OpenGL and Vulkan rendering pipelines
- Add UI translations and Android string resources for TAA option
- Implement Halton sequence jittering for temporal sampling
- Add motion vector validation and neighborhood clamping to reduce ghosting
- Configure aggressive temporal blending to minimize visual artifacts
- Add proper descriptor set management for Vulkan TAA implementation

The TAA implementation provides high-quality anti-aliasing by combining
information from multiple frames with per-pixel jittering, resulting
in smoother edges and reduced aliasing artifacts while maintaining
good performance and temporal stability.

Fixes: Black screen issues with proper descriptor set bindings
Fixes: Ghosting artifacts with improved temporal blending parameters
Fixes: Jitter visibility with reduced jitter intensity (50% scaling)
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-21 10:34:19 +10:00
Zephyron
6e6b2f438e feat: add High-End and Insane VRAM modes with leak prevention
- Add HighEnd and Insane VRAM usage modes for RTX 4090/4080+ users
- Implement VRAM limits: HighEnd (12GB), Insane (22GB) with scaling
- Optimize buffer allocation with larger chunks for high-end GPUs
- Add VRAM leak detection and aggressive cleanup for Insane mode
- Increase shader compilation buffer sizes for better performance
- Add VRAM monitoring functions to Vulkan rasterizer
- Implement memory usage tracking for staging buffers

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-14 16:05:31 +10:00
Zephyron
00d6eb12d9 feat: Add list view toggle and separate applets settings category
- Add list/grid view toggle button to games fragment
- Implement dual-view GameAdapter with separate ViewHolders for grid/list layouts
- Create compact card_game_list.xml layout for list view
- Add "Applets on Android" settings category to separate applet settings from Zep Zone
- Add logging settings with log filter configuration
- Add view toggle icons (ic_view_list, ic_view_grid)
- Update strings.xml with new UI text and settings descriptions

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-08-21 16:47:08 +10:00
Zephyron
e27fc65d11 feat: remove frame generation options from all platforms
Frame generation was marked as WIP and not ready for production use.
This commit removes all frame generation related code and UI elements
to prevent users from enabling an incomplete feature.

Changes:
- Remove frame generation settings from Android UI (Kotlin/XML)
- Remove frame generation settings from Desktop UI (Qt/C++)
- Remove frame generation enums and settings from core (C++)
- Remove frame generation Vulkan renderer implementation
- Remove frame generation shader files
- Update CMake build configuration

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-08-17 16:09:05 +10:00
Zephyron
96dd82ea3b chore(network): Change web API from HTTPS -> HTTP
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-08-11 18:41:23 +10:00
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
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
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
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
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
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
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
abf5f6730b audio_core: Add OpenAL audio backend support
- Add complete OpenAL sink implementation with robust error handling
- Support for device enumeration using ALC extensions
- Implement dummy streams for graceful degradation when OpenAL fails
- Add proper audio threading and buffer management
- Include comprehensive logging and diagnostic information
- Add stream limits and retry mechanisms for stability

Additional changes:
- Add ENABLE_OPENAL CMake option and OpenAL dependency management
- Include openal-soft in vcpkg dependencies
- Add OpenAL to audio engine settings enum

The OpenAL backend provides an alternative audio solution alongside
existing Cubeb and SDL2 backends, with enhanced device compatibility
and improved error recovery mechanisms.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-06-01 15:26:55 +10:00
Zephyron
fdf1bfc06a feat: Add 10GB, 12GB, 14GB, and 16GB DRAM configuration options
- Extended MemoryLayout enum with new memory size options
- Added corresponding SMC memory size and arrangement constants
- Updated system control functions to handle new memory configurations
- Added appropriate application pool sizes for higher memory modes
- Updated UI translations to display new DRAM options as "Unsafe"
- Increased maximum memory layout setting from 8GB to 16GB

This allows users to configure higher memory amounts for games and
texture mods that require more than the standard 4-8GB configurations.
All new options are marked as "Unsafe" in the UI to indicate they
are experimental features beyond Nintendo's official specifications.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-24 17:10:19 +10:00
Zephyron
c5604ced4f feat: Implement 32:9 aspect ratio
This commit introduces support for a 32:9 aspect ratio throughout Citron.

Key changes include:

-   **Enum Updates**: Added `R32_9` to `Settings::AspectRatio` and `Layout::AspectRatio` enums, ensuring consistent integer mapping for casting between them.
-   **Core Logic**:
    -   Modified `UISettings::CalculateWidth` to correctly compute width for the 32:9 ratio.
    -   Updated `Layout::EmulationAspectRatio` to handle the new `R32_9` case and return the appropriate float value (9.0f / 32.0f).
-   **Android Integration**:
    -   Updated `EmulationFragment.kt` and `EmulationActivity.kt` (for Picture-in-Picture) to recognize and apply the 32:9 aspect ratio (mapping setting value `4` to `Rational(32, 9)`).
-   **UI Configuration**:
    -   Added "Force 32:9" to the aspect ratio selection in the graphics settings UI via `shared_translation.cpp`. This string is translatable.

This enhancement allows users to utilize ultra-widescreen 32:9 displays for a more immersive experience.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-18 15:10:47 +10:00
Zephyron
fef3a61397 feat(common): Disable telemetry by default and update web API URL
- Disables the `enable_telemetry` setting by default.
- Updates the `web_api_url` to "https://api.ynet-fun.xyz".
- Updates the copyright year and project name.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-06 16:25:05 +10:00
Zephyron
b2d9cf4a01 chore: update project branding to CITRON
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-06 16:11:33 +10:00
Zephyron
5e16e20427 chore: update project branding to Citron
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-06 16:08:59 +10:00
Zephyron
bfb82e577c chore: update project branding to citron
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-06 16:06:48 +10:00
liamwhite
79edad2533 Merge pull request #13159 from liamwhite/web-error
core: enable error applet, add stubs for web applet
2024-02-26 12:44:55 -05:00
Liam
25c3bbba0e settings: remove global override for smash on amdvlk 2024-02-26 11:16:18 -05:00
Liam
dc50b95a47 settings: enable error applet 2024-02-24 22:56:08 -05:00
wheremyfoodat
ed315fb8a5 common/ring_buffer: Include <limits> header 2024-02-24 02:34:09 +02:00
liamwhite
215e887be0 Merge pull request #13100 from liamwhite/audio-ipc
audio: move to new ipc
2024-02-23 11:34:21 -05:00
Narr the Reg
984396a21a Merge pull request #13001 from liamwhite/scaled-availability
vulkan_device: don't use fixed cap for memory limits
2024-02-22 11:31:17 -06:00
Liam
c575a85233 audio: rewrite IAudioDevice 2024-02-20 22:15:38 -05:00
FearlessTobi
310c1f50be scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
2024-02-19 16:00:46 +01:00
Liam
56810541f0 vulkan_device: don't use fixed cap for memory limits 2024-02-18 18:59:13 -05:00
t895
50ecad547e android: Input mapping 2024-02-17 12:32:33 -05:00
Narr the Reg
2ff45cd0da Merge pull request #12756 from liamwhite/applet-multiprocess-hwc
general: applet multiprocess
2024-02-11 20:58:28 -06:00
liamwhite
7ec7ff0f30 Merge pull request #12920 from t895/jni-common
android: Move JNI setup and helpers to common
2024-02-09 11:49:25 -05:00
Liam
fa12384350 general: add default configurations for applet mode 2024-02-09 09:20:53 -05:00
t895
c8e8c614a0 common: fs: Expand android macros 2024-02-08 14:13:46 -05:00
t895
e7c4c8b993 android: Move JNI setup and helpers to common 2024-02-08 13:45:26 -05:00
liamwhite
263dfa95e4 Merge pull request #12914 from FernandoS27/vc-refactor
VideoCore Refactor Part 1.
2024-02-08 10:59:59 -05:00
Fernando Sahmkow
fa47ac1c9f Common: Rename SplitRangeSet to OverlapRangeSet 2024-02-05 23:01:17 +01:00
Liam
0e950baf41 typed_address: test values are unsigned 2024-02-05 12:47:10 -05:00
Fernando Sahmkow
0d5a3abeae Buffer Cache: Refactor to use Range sets instead 2024-02-05 11:06:52 +01:00
Fernando Sahmkow
01ba6cf610 Common: Introduce Range Sets 2024-02-04 20:01:50 +01:00