Commit Graph

27483 Commits

Author SHA1 Message Date
Zephyron
7dea15e642 Revert "fix: Prevent race condition on unmapped memory reads"
This reverts commit 13c60ebcde.

This needs a rework as it caused Shader Corruption On Many Titles
2025-10-16 17:40:53 +10:00
Zephyron
ab18e750d8 feat: Add ZIP firmware installation and update Android VVL to 1.4.328.1
Firmware Installation:
- Add OnInstallFirmwareFromZip() to install firmware from ZIP archives
- Implement ExtractZipToDirectory() with libarchive (primary) and PowerShell fallback (Windows)
- Add user dialog to choose between folder or ZIP installation
- Validate NCA files at ZIP root before installation
- Automatic cleanup of temporary extraction directory

Android Vulkan Validation Layers:
- Update from sdk-1.3.261.1 to vulkan-sdk-1.4.328.1
- Fix extraction path for new VVL archive structure
- Add file existence checks and improved error messages

Benefits:
- Users can install firmware directly from ZIP files
- No manual extraction required
- Better debugging on newer Android devices

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-16 16:31:49 +10:00
Zephyron
c64bcb3f82 Merge branch 'fix_linux_test_unit' into 'main'
fix: .gitlab-ci.yml

See merge request citron/emulator!103
2025-10-16 16:21:19 +10:00
collecting
c664d913dc fix: Re-add Package-Release 2025-10-16 01:59:30 +00:00
collecting
058df85af0 fix: .gitlab-ci.yml 2025-10-16 01:52:31 +00:00
Zephyron
f3374ea7e6 Merge branch 'unmapped_memory_fix' into 'main'
fix: Prevent race condition on unmapped memory reads

See merge request citron/emulator!99
2025-10-15 15:05:47 +10:00
collecting
13c60ebcde fix: Prevent race condition on unmapped memory reads 2025-10-15 04:24:03 +00:00
Zephyron
61ba432ac0 Merge branch 'resize_windows_fix' into 'main'
fix: Dialogs now correctly remember their window size

See merge request citron/emulator!98
2025-10-15 12:23:03 +10:00
Zephyron
038619c543 remove: first-time telemetry popup
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-14 15:56:20 +10:00
Zephyron
c15b6519d5 chore: replace wiki URLs with Discord support links
Replace all citron-emu.org/help and wiki URLs with discord.gg/citron
across Android resources (15+ languages) and desktop UI.

- Update app disclaimers, error messages, and help links
- Consolidate FAQ/Quickstart/Mods menu items into "Get Support"

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-13 13:59:48 +10:00
collecting
b162d63a1b fix: Resizable w/ Window Memory 2025-10-12 21:45:53 +00:00
collecting
9f30085cbb fix: Resizable w/ Window Memory 2025-10-12 21:45:19 +00:00
collecting
e96c9d7a8f fix: Resizeable w/ Window Memory 2025-10-12 21:44:43 +00:00
collecting
8c629a29c3 fix: Non-fullscreen & Resize Memory 2025-10-12 21:43:05 +00:00
Zephyron
31528201b5 ci: Use Qt6 system packages instead of Qt5
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-12 18:31:52 +10:00
Zephyron
2ad9d9d17a ci: Use system Qt6 instead of downloading with aqt
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-12 18:17:41 +10:00
Zephyron
ec7c6787cd ci: Add python-pip to fix Qt download with aqt
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-12 17:59:16 +10:00
Zephyron
a15719b21d hid_core: Add NpadCondition to shared memory to fix no-controller crash
Fix crash when launching games without a connected controller by adding
a global NpadCondition structure at offset 0x3E200 in HID shared memory.
Games read this structure on startup to verify controller state validity,
and crash with a userspace PANIC if the data is uninitialized.

The NpadCondition structure contains:
- is_initialized flag (set to 1)
- hold_type (controller orientation)
- is_valid flag (set to 1)

These fields are properly initialized when shared memory is created,
ensuring games see valid controller state data even before any
controllers are physically connected.

Fixes crash in The Legend of Zelda: Echoes of Wisdom and other titles
that validate controller state on startup.

Based on LotP's implementation of the NpadCondition structure.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-12 16:49:03 +10:00
Zephyron
bc81e53c53 refactor: Convert ENUM macros to explicit enum class definitions
- Convert ENUM() macro calls to standard C++ enum class syntax
- Add explicit numeric values to each enum member for clarity
- Manually define EnumMetadata<T>::Canonicalizations() specializations
- Manually define EnumMetadata<T>::Index() specializations
- Special handling for ResolutionSetup which requires signed (s32) values

Benefits:
- Improved type safety and compiler error messages
- Better IDE support for navigation and refactoring
- More explicit and self-documenting code
- Easier to debug enum-related issues
- Eliminates macro expansion complexity

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-12 16:42:56 +10:00
Zephyron
df14b96c6b feat: Add romfslite mod folder support (Atmosphere 1.9.5)
Support the romfslite folder type introduced in Atmosphere 1.9.5 for
memory-optimized mod loading. The emulator now detects and loads
romfslite folders the same way as romfs folders.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 20:24:18 +10:00
Zephyron
c8b3f0c98c Fix: Explicit float casts for Android NDK compilation
Add static_cast<f32>() to integer-to-float conversions in audio_core
to satisfy Android NDK's -Werror=implicit-int-float-conversion flag.

Fixes compilation errors in fft.cpp, loudness_calculator.cpp, and
limiter.cpp on Android builds.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 18:51:08 +10:00
Zephyron
4e0178c678 Merge branch 'sdk20-rev15-audio-changes' into 'main'
feat: REV15 audio renderer + HID fix (v0.8.0)

See merge request citron/emulator!97
0.8.0
2025-10-11 17:11:09 +10:00
Zephyron
fbb4f5c015 Fix: Recover from null pointer execution crashes
Add proper recovery mechanism for null pointer execution (PC < 0x1000)
by returning from invalid function calls using the Link Register instead
of blindly continuing execution.

Fixes infinite crash loop in games like Little Nightmares III.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 17:02:28 +10:00
Zephyron
56dba09e0c feat: REV15 audio renderer + HID fix (v0.8.0)
Complete SDK15 audio implementation with native float biquads.
Fixes TotK 1.4.2 and BotW 1.8.2 boot loops.

- Add REV15 float biquad filter support
- Implement VoiceInParameterV2 (0x188 bytes)
- Add SplitterDestinationV2b with biquad filters
- Fix HID sampling number (double state value)
- Add AudioSnoopManager and AudioSystemManager
- Implement FinalOutputRecorder system
- Add FFT and loudness calculator (ITU-R BS.1770)
- Add full Limiter effect

Resolves boot loops and controller detection in SDK20 games.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 14:10:08 +10:00
Zephyron
3c16d8330b chore: Version bump to 0.8.0
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 13:51:57 +10:00
Zephyron
ded5906f03 chore: Version bump to 0.7.2
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 13:47:57 +10:00
Zephyron
9a61cf07a6 feat(renderer): Add ScaleFX to Settings enum
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 13:36:00 +10:00
Zephyron
568ab699f6 feat(renderer): Add ScaleFX pixel art upscaling filter
Implements ScaleFX algorithm for pixel art upscaling with edge
preservation. Supports both OpenGL and Vulkan with FP16/FP32
variants for hardware optimization.

ScaleFX is designed to reduce pixelation while preserving sharp
edges, ideal for low-resolution and pixel art games.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 13:35:19 +10:00
Zephyron
0c5c1bbf7f feat(graphics): add 0.25X quarter resolution downscaling
- Add Res1_4X resolution setup with down_shift=2
- Mark as EXPERIMENTAL in UI labels
- Support on both Qt and Android frontends

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 13:32:27 +10:00
Zephyron
bdd2875642 feat: Add Profile-Guided Optimization (PGO) build support
Implements two-stage PGO build system with CMake integration and
automated build scripts for Windows, Linux, and macOS. Supports
MSVC, GCC, and Clang compilers.

PGO enables runtime profiling-based optimizations for improved
emulator performance. Includes helper scripts to streamline the
build workflow and resolve platform-specific issues.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 13:30:39 +10:00
Zephyron
2a7e6c74bd Fix Android RAM overlay instant crash
Use getMainLooper() instead of myLooper() in Handler initialization
and add view attachment checks to prevent crashes.

Reported-by: Shadai (theonlyshadai) on Discord
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-08 16:59:38 +10:00
Zephyron
4c5f12ec69 fix(qt): Use QImage::mirrored() instead of non-existent flipped()
QImage does not have a flipped() method. Replace with the correct mirrored(false, true) call to perform vertical image flipping for
screenshot capture.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-08 16:24:54 +10:00
Zephyron
c98d253040 cmake: Auto-create user directory for portable mode
Suggested-by: dr.stug@citron-emu.org
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-08 16:21:14 +10:00
Zephyron
c1a6f2d47b Merge branch 'refine_lanczos' into 'main'
fix(Renderer): Stabilize Lanczos Filter

See merge request citron/emulator!96
2025-10-08 11:13:06 +10:00
Zephyron
20cf1339a5 Merge branch 'perf_temp_feat' into 'main'
feat(overlay): Add CPU & GPU Temperature Monitoring

See merge request citron/emulator!95
2025-10-08 11:12:45 +10:00
Zephyron
15498b13d4 Merge branch 'web_backend_bug' into 'main'
fix: Use-After-Free Bug

See merge request citron/emulator!94
2025-10-08 11:12:17 +10:00
Zephyron
da07284544 Merge branch 'clang_discordrpc_warning_fix' into 'main'
fix: Clang Compilation Warnings

See merge request citron/emulator!93
2025-10-08 11:11:54 +10:00
collecting
c2d984610b refine: Lanczos Filter 2025-10-07 20:39:18 +00:00
collecting
9c7d0bb49c feat: Battery Percent & Temp for Android 2025-10-07 19:51:12 +00:00
collecting
8a7e3c5398 feat: Add Battery Percentage & Temp for Android 2025-10-07 19:50:30 +00:00
collecting
c2c592c8ea feat: Add Color & UI Fix for Temp 2025-10-07 13:07:31 +00:00
collecting
a9b48aaa39 feat: Add Color & Fix UI For Temp 2025-10-07 13:06:56 +00:00
collecting
0386af7a17 feat: Add GPU & CPU Temperatures 2025-10-07 12:44:46 +00:00
collecting
e9feac8b8f feat: Add CPU & GPU Temperature 2025-10-07 12:44:18 +00:00
collecting
f9fe12a0ea feat: Add CPU & GPU Temperatures 2025-10-07 12:43:47 +00:00
collecting
82f6c4a7c5 fix: Use-After-Free Bug 2025-10-07 11:27:03 +00:00
collecting
2d94e12fba fix: Clang Compilation Warnings 2025-10-07 10:10:06 +00:00
Zephyron
996237f889 Merge branch 'multiple_compile_fixes' into 'main'
fix: Multiple Compiler Warnings

See merge request citron/emulator!92
2025-10-07 18:36:25 +10:00
Zephyron
3a25e69004 Merge branch 'add_copyright' into 'main'
fix: Add Copyright

See merge request citron/emulator!91
2025-10-07 18:36:20 +10:00
collecting
72d6f9448b add: -p0 to discord-rpc patch 2025-10-07 07:31:38 +00:00