Commit Graph

27093 Commits

Author SHA1 Message Date
Phoenix
308cc609c5 feat(renderer): Add frame skipping and interpolation logic
- Further Implemented frame skipping functionality to improve performance on lower-end devices by skipping alternate frames.
- Added interpolation logic to create additional frames, resulting in smoother gameplay when frame interpolation is enabled.
- Introduced new settings for toggling frame skipping and interpolation in the renderer configuration.
2024-09-12 15:35:39 +10:00
Phoenix
9a34d40523 refactor(settings): change frame skipping category from Graphics to Core
- Moved the `frame_skipping` setting from the `Graphics` category to the `Core` category.
- This aligns the setting with core emulator functionalities related to performance.
2024-09-11 21:45:51 +10:00
Phoenix
c581bd56b2 chore: remove key generation functionality
- Removed obsolete key generation logic from the project.
- This feature is no longer required for the current workflow.
- Cleaned up associated files and code references to ensure a streamlined build process.
2024-09-11 21:44:31 +10:00
Phoenix
7bad57e519 feat(settings): add frame skipping option to improve performance
- Added a new setting `frame_skipping` in the settings configuration.
- Provides users the ability to enable or disable frame skipping via the UI.
- Frame skipping helps improve performance by skipping frames when the emulator can't maintain the target frame rate, at the cost of visual fluidity.
- Added descriptive text to explain the setting's purpose and its impact on gameplay.
2024-09-11 21:27:33 +10:00
Phoenix
25b8a93db0 chore(feat): Optimize GuestMemory and GuestMemoryScoped classes for performance and maintainability
- Refactored `GuestMemory` and `GuestMemoryScoped` to remove redundant code and improve clarity.
- Introduced `allocateBackupOrCopy` helper function to handle memory backup or copy operations.
- Moved data writing logic into a dedicated `writeData` function in `GuestMemoryScoped` to reduce repetition.
- Marked functions `noexcept` where applicable to optimize performance and indicate exception safety.
- Used `constexpr if` to reduce unnecessary runtime checks.
- Improved resource management by adding move semantics for constructors and assignment operators in `GuestMemory`.
- General improvements to code maintainability and efficiency without changing functionality.
2024-09-11 19:23:56 +10:00
Phoenix
b9599e203b chore(strings.xml): Added \ before ' to allow compiliation
- This modifies the strings.xml file to allow apostrophes to be used by declaring a \ before the apostrophe
- Also We Are Number One ❤️
2024-09-11 18:57:58 +10:00
Phoenix
a707ba7c14 feat: Add sync core speed setting
- Implemented `useSyncCoreSpeedSetting` to handle `BooleanSetting.SYNC_CORE_SPEED`.
- Mirrored structure from the existing multi-core setting for consistency.
2024-09-11 18:18:40 +10:00
Phoenix
651e8960f7 fix: resolve narrowing conversion issue in mm_u.cpp
- Added explicit cast to address narrowing conversion warning in the initializer list for `IPC::ResponseBuilder`.
- Ensured compatibility with strict type conversion requirements.
2024-09-11 18:01:47 +10:00
Phoenix
e478b4b441 fix: correct mismatched struct/class declaration in hardware_composer.cpp
- Changed forward declaration of `Layer` from `class` to `struct` to match its actual definition in `display.h`.
- Resolved potential linker errors under the Microsoft C++ ABI due to mismatched struct/class declarations.
2024-09-11 17:58:05 +10:00
Phoenix
1a75715c78 chore/feat: update core_timing.cpp to fix compilation errors
- Resolved narrowing conversion issues by applying appropriate casting.
- Fixed incorrect `evt_sequence_num` by using `sequence_number`.
- Updated the use of `std::optional::value_or` to prevent type mismatch with `chrono` durations.
- Ensured compatibility with `std::chrono` types across timing-related logic.
2024-09-11 17:52:00 +10:00
Phoenix
a5a49d4a45 feat: Add "Sync Core Speed" option to Phoenix Hacks settings
- Added `CORE_SYNC_SPEED` to the Phoenix Hacks submenu as a toggleable option.
- This allows users to enable or disable synchronization of CPU core speed with game rendering.
- Updated the settings menu to include relevant title and description for the new setting.
2024-09-11 16:25:19 +10:00
Phoenix
5c661f4064 chore: Update HardwareComposer header and implementation alignment
- Added missing declaration for `ReleaseFramebuffers` in the `HardwareComposer` class.
- Forward-declared the `Layer` class to avoid incomplete type issues.
- Ensured method declarations in the header match the implementation in the `.cpp` file.
- Verified necessary includes and forward declarations for all relevant types.
2024-09-11 16:01:58 +10:00
Phoenix
ad3ad92feb feat: Add framebuffer caching and composition for HardwareComposer
- Implemented the `HardwareComposer::CacheFramebufferLocked` function to handle caching and reuse of framebuffers.
- Introduced logic to acquire and release framebuffers based on their acquisition state.
- Integrated support for sorting layers by Z-index during composition and rendering.
- Added functionality to normalize swap intervals, supporting speed control based on frame timing.
- Optimized the handling of framebuffers, releasing them when no longer needed to avoid resource contention.
- Improved buffer management to reduce redundant acquisitions, enhancing overall performance.
2024-09-11 16:01:38 +10:00
Phoenix
232fe683df refactor: Clean up and optimize CoreTiming module
- Modularized common logic for multicore and single-core checks using ternary operators.
- Reduced code duplication in event scheduling and handling.
- Implemented early returns to simplify control flow and improve readability.
- Flattened nested conditions and improved consistency in function calls.
2024-09-11 15:51:29 +10:00
Phoenix
04d4d59596 refactor: Improve MM_U service code structure and reduce redundancy
- Modularized repeated patterns for request parsing and response building:
  - Created helper functions `ParseAndRespond`, `ParseSetAndRespond`, and `ParseGetAndRespond` for consistency and readability.
  - Introduced `LogStubCall` for logging stubbed functions to reduce redundancy.
- Cleaned up `mm_u.h` by removing redundant enum assignments and replacing `typedef` with `using`.
- Simplified and improved readability in `mm_u.cpp` by reducing duplicate code and centralizing response logic.
- Ensured consistency and streamlined logic across all functions handling IPC requests.
2024-09-11 15:19:41 +10:00
Phoenix
d183dcf2b7 chore: remove duplicate enum class ErrorModule 2024-09-10 20:13:24 +10:00
Phoenix
2f6957b97c feat(enum): add new error module entries
- Added new error modules to the `ErrorModule` enum:
  - `Nverpt (520)`
  - `Am_StuckMonitor (521)`
  - `Pia (618)`
  - `Eagle (623)`
  - `Coral (815)`
2024-09-10 20:06:58 +10:00
Phoenix
78b74180e5 feat(audio): add support for new features in revision 12 and enhance error logging
- Added new features `EnhancedAudioProcessing` and `AdvancedNoiseSuppression` to `SupportTags` for revision 12.
- Updated `CurrentRevision` to 12.
- Expanded `features` array to map the new features to revision 12.
- Improved error logging:
  - Logs an error to `std::cerr` if an invalid `SupportTag` is passed.
  - Logs an error to `std::cerr` if the user revision exceeds the `CurrentRevision` value.
- Ensured `CheckValidRevision` function logs an error for invalid revision numbers.
2024-09-10 19:53:46 +10:00
Phoenix
9a0356364c chore: remove unused shader code for frame interpolation
- Removed fragment shader that blended previous and current frames with a 50% linear interpolation
- This shader was no longer required or used in the current pipeline
- Better Interpolation Method Used
2024-09-10 15:59:03 +10:00
Phoenix
e57d30616e chore: add conditional check for GL_NV_gpu_shader5 extension
- Wrapped `GL_NV_gpu_shader5` extension with `#ifdef` to ensure it is only enabled if available
2024-09-10 15:56:17 +10:00
Phoenix
e360070de4 chore: update HLE API version constants for Horizon OS and Atmosphere
- Updated Horizon OS version to 18.1.0 (from 12.1.0)
- Updated NintendoSDK firmware display version to 18.1.0-1.0
- Updated VERSION_HASH to "437857bcb1604c717ae3fe62d03ae1fcaa783264"
- Updated Atmosphere release version to 1.7.1 (from 1.0.0)
2024-09-10 15:51:21 +10:00
Phoenix
1b8adb886d feat: add ABGR8 sRGB to D24S8 conversion shader and pipeline
- Added shader module and pipeline for ABGR8 sRGB to D24S8 conversion in `convert_abgr8_srgb_to_d24s8.frag`.
- Implemented `BlitImageHelper::ConvertABGR8SRGBToD24S8` to handle the conversion using the new pipeline.
- Integrated the shader and pipeline with the `Framebuffer` and `ImageView` for proper rendering.
- Added logic to select the conversion function when the source image format is `PixelFormat::A8B8G8R8_SRGB`.
2024-09-09 17:36:00 +10:00
Phoenix
70557e8d2f feat(renderer): add new host shader for improved rendering
- Implemented a new host shader to enhance rendering performance and visual quality.
- The shader optimizes the handling of specific graphical effects and improves efficiency in Vulkan rendering.
- Integrated the shader into the rendering pipeline, ensuring compatibility with existing framebuffer handling.
- Added necessary shader compilation steps and resources for proper deployment across platforms.
2024-09-09 17:22:16 +10:00
Phoenix
94262bc4c5 feat: optimize logic operation handling and update dynamic state management
- Refactored logic operation handling for AMD drivers to reduce unnecessary object creation.
- Inlined lambda for float type checking in vertex attribute format to improve performance.
- Updated dynamic state management with support for extended dynamic state and primitive restart enable.
- Added checks for various extended dynamic state support features (v1, v2, v3).
2024-09-09 16:58:00 +10:00
Phoenix
bdd495331e feat(renderer): add frame skipping with interpolation in Vulkan renderer
- Implemented frame skipping logic to skip every 4th frame in the Vulkan renderer.
- Added basic frame interpolation using a fragment shader to blend the previous and current frames.
- The interpolation shader performs a 50% blend between the two frames to smooth out skipped frames.
- Frame buffers are captured and used for interpolation in case a frame is skipped.
2024-09-09 16:49:39 +10:00
Phoenix
e92307321c chore(vram): add in missing valuesID 2024-09-08 19:36:37 +10:00
Phoenix
a7bbced580 chore(vram): fix arrays.xml & added in proper astc methods 2024-09-08 19:35:11 +10:00
Phoenix
fe5917e936 fix(strings): add \ before ' to allow compilation 2024-09-08 19:24:02 +10:00
Phoenix
014e9edf09 feat(memory): set memory limit based on available device memory
- Implemented logic to determine memory limit based on available memory.
- The system now sets a memory limit of 8 GiB, 6 GiB, or 4 GiB based on the available memory, using the total available memory if it's less than 4 GiB.
2024-09-08 19:18:32 +10:00
Phoenix
f8250cdf03 feat(settings): add Phoenix Hacks settings to submenu
- Added multi-core, shader backend, NVDEC emulation, ASTC decode method, and ASTC recompression settings to the Phoenix Hacks submenu.
- This enhances the customization of rendering settings in the Phoenix Hacks section.
2024-09-08 19:13:22 +10:00
Phoenix
1f86cd600b feat(resolution): define ResolutionSetup enum and integrate adaptive scaling
- Added ResolutionSetup enum to represent different resolution scaling levels.
- Integrated dynamic resolution adjustment based on FPS into the FPS overlay.
2024-09-08 16:47:23 +10:00
Phoenix
d0f0f82258 fix(emulation): resolve type mismatch and null safety issues in FPS overlay updater
- Fixed type mismatch by safely handling nullable 'perfStatsUpdater' with null-safe operators.
- Ensured proper null safety handling when posting and removing callbacks.
- Resolved smart cast issue by preventing potential state changes of 'perfStatsUpdater'.
2024-09-08 16:25:48 +10:00
Phoenix
4d2654b257 fix(overlay): correct FPS overlay display logic and memory info formatting
- Fixed argument order in String.format for FPS and memory usage.
- Improved null safety checks for binding and perfStatsUpdater.
- Ensured proper removal of callbacks to avoid memory leaks.
2024-09-08 15:39:04 +10:00
Phoenix
4603f96c0f feat(menu): add multi-core support to Phoenix Hacks submenu
- Implemented multi-core option in the Phoenix Hacks submenu.
- Enhanced user control over performance settings with multi-core toggle.
2024-09-08 15:38:04 +10:00
Phoenix
b11e602beb feat(settings): add 'Phoenix Hacks' submenu for Phoenix-specific optimizations
- Introduced a new 'Phoenix Hacks' submenu in the settings UI.
- Added options for Phoenix-specific hack toggles and adjustments.
- Prepared the settings infrastructure for upcoming Phoenix cherry-picked optimizations.
2024-09-08 14:55:08 +10:00
Phoenix
818e3cfb93 feat: Fixed firmware uninstallation functionality 2024-09-08 14:47:22 +10:00
Phoenix
160c620ef5 feat: Add firmware uninstallation functionality
- Implemented `uninstallFirmware` method to remove installed firmware files from the system.
- Added confirmation and error handling for firmware uninstallation.
- Updated UI strings with messages for firmware uninstallation process.
- Linked the uninstallation option in the installable list of actions.
2024-09-08 14:37:40 +10:00
Phoenix
280a416bc1 refactor: add battery temperature monitoring and memory usage to FPS overlay
- Added battery temperature tracking through a broadcast receiver to update thermal overlay.
- Integrated memory usage display in the performance overlay.
- Updated lifecycle management to handle battery receiver registration and unregistration.
- Refined thermal overlay visibility and removed extra handling for foldable layouts.
- Improved overall performance tracking, memory statistics, and UI adjustments.
2024-09-08 14:26:47 +10:00
Phoenix
f20cd74ccf refactor: Simplify custom GPU driver support check
- Removed `CheckKgslPresent()` from `SupportsCustomDriver()` function.
- Updated API level requirement to 30 for custom driver support.
- Simplified the `supportsCustomDriverLoading` JNI function to rely solely on API level check.
2024-09-08 14:23:17 +10:00
Phoenix
49b663087c feat: Add log extraction tool to filter device info, warnings, and errors
- Introduced a Python-based tool for processing log files.
- The tool removes unnecessary `<Info>` lines, focusing on device information, warnings, and errors.
- Designed for easy integration into development workflows with drag-and-drop file selection.
- Output is formatted for Discord, making it easy to share logs with relevant details.
2024-09-08 14:11:00 +10:00
Phoenix
bac46e649e chore: adjust NVN bias offset range for broader memory alignment
- Updated `nvn_bias` structure to extend the offset range.
- Adjusted `offset_begin` from 0x110 to 0x100 and `offset_end` from 0x610 to 0x700.
- These changes provide a broader range for better memory alignment and handling.
2024-09-08 13:32:40 +10:00
Phoenix
c55a39d199 chore(cmake): comment out VVL download and extraction logic
- Commented out the section in `CMakeLists.txt` responsible for downloading and extracting Vulkan Validation Layers (VVL).
- As VVL is now provided manually, the automated download and extraction process is no longer required.
- The script block responsible for copying the VVL binaries to `jniLibs` has also been commented out.
2024-09-08 13:31:19 +10:00
Phoenix
d44b52766c chore(strings): update branding and correct URLs in strings.xml
- Replaced outdated branding references with the new brand name.
- Updated URLs to point to the correct and current addresses.
- Ensured all references in `strings.xml` reflect the latest company or product updates.
2024-09-08 13:30:25 +10:00
Phoenix
b9345b92c0 chore(build-system): update to Gradle 8.10 and improve Android build configuration
- Upgraded Gradle to version 8.10 for enhanced build performance and compatibility.
- Updated Android Studio `build.gradle.kts` with new dependencies, NDK, and JDK versions.
- Improved obfuscation settings for better security and minimized APK size.
- Ensured all dependencies are compatible with the latest tooling for smoother development workflow.
2024-09-08 13:29:52 +10:00
Phoenix
1dd89a04ee feat(shader-recompiler): add stubs for SR_WScaleFactorXY and SR_WScaleFactorZ
- Implemented stubs for `SR_WScaleFactorXY` and `SR_WScaleFactorZ` to handle scaling factors for X, Y, and Z dimensions in the shader recompiler.
- Placeholder logic for scaling factor fetching, allowing future extension for proper uniform or buffer access.
- Ensures compatibility with the GLSL backend by providing stubbed implementations for scaling factors.
2024-09-08 13:28:45 +10:00
Phoenix
86ea71d565 fix(pointer-handling): correct handling of std::optional and pointer comparisons
- Implemented necessary fixes for handling `std::optional`, ensuring proper assignment and value checks.
- Corrected all assignments and comparisons with pointers and `nullptr` to avoid potential runtime issues.
- Improved code reliability by addressing cases where optional values were improperly accessed or compared with null pointers.
2024-09-08 13:26:17 +10:00
Phoenix
dfa17c7643 feat(branding): update logo to new vibrant cyan and purple
- Replaced the old logo colors with vibrant cyan (#00FFFF) and bright purple (#BF40BF)
- Adjusted all relevant branding assets to reflect the new color scheme
- Updated documentation and references to the logo
2024-09-07 21:49:18 +10:00
Phoenix
55b4fa7b7e refactor(shader): consolidate EmitInvocationInfo functions and improve consistency
- Merged two versions of EmitInvocationInfo into a single function handling multiple stages.
- Replaced repeated shift values with a constant `SHIFT_AMOUNT` for improved readability and maintainability.
- Ensured consistent use of comments and improved code organization.
2024-09-07 20:52:17 +10:00
Phoenix
6a74676990 refactor(shader): improve EmitInvocationInfo for clarity and consistency
- Replaced hardcoded shift value of 16 with a named constant `SHIFT_AMOUNT` for better readability and maintainability.
- Standardized the formatting and operation of all stages for consistency.
- Added comments to clarify the purpose of each case.
- Improved logging in the default case to include the shader stage for better debugging.
2024-09-07 20:48:19 +10:00
Phoenix
e85ff33df6 chore(scripts): update submodule management batch script
- Fixed path formatting issues for Windows batch script by using backslashes (`\`) in `rmdir` commands.
- Added `--force` option to `git submodule add` commands to handle existing local directories.
- Addressed warnings related to line-ending conversion (LF to CRLF).
- Improved error handling during submodule cleanup, removal, and reinitialization.
2024-09-07 20:31:30 +10:00