Commit Graph

24304 Commits

Author SHA1 Message Date
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
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
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
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
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
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
collecting
0c2502f3fc fix: disable Warnings 2025-10-07 06:54:08 +00:00
collecting
7b0b3f37d2 remove: Deprecated Value 2025-10-07 06:53:11 +00:00
collecting
101363c5eb fix: Qt::Vertical 2025-10-07 06:52:32 +00:00
collecting
2a53da7b16 fix: checkStateChanged 2025-10-07 06:51:58 +00:00
collecting
944bfc3918 fix: configure_system.cpp 2025-10-07 06:51:21 +00:00
collecting
4cdf19f323 fix: checkStateChanged 2025-10-07 06:50:32 +00:00
collecting
325a157362 fix: checkStateChanged 2025-10-07 06:49:50 +00:00
collecting
6b019fc34d fix: checkStateChanged 2025-10-07 06:48:54 +00:00
collecting
340838c0eb fix: checkStateChanged 2025-10-07 06:46:53 +00:00
collecting
ea26753051 fix: Add Copyright 2025-10-07 06:31:32 +00:00
Zephyron
d06586b047 Merge branch 'ring_buffer_fix' into 'main'
fix: Stable & Predictable 64-byte

See merge request citron/emulator!90
2025-10-07 15:47:34 +10:00
Zephyron
8b830b310b fix(dynarmic): Remove MSVC-specific fastmem_pointer assignments
Unify fastmem_pointer handling by using reinterpret_cast<uintptr_t>()
and std::nullopt consistently across all platforms, fixing MSVC
compilation errors with std::optional<uintptr_t> assignment.

Fixes: C2679 binary '=' operator errors on MSVC
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-07 15:45:56 +10:00
collecting
add9a52fcd fix: Stable & Predictable 64-byte 2025-10-07 05:37:38 +00:00
collecting
791718ea7f fix: string for Citron compilation error 2025-10-07 05:10:41 +00:00
Zephyron
1d13bbdadc Merge branch 'copyright_addition' into 'main'
fix: Copyright

See merge request citron/emulator!87
2025-10-07 15:05:00 +10:00
collecting
32ea5f0fd0 fix: MSVC Compiler Error 2025-10-07 02:36:00 +00:00
collecting
20e594ca46 fix: MSVC Compiler Error 2025-10-07 02:35:03 +00:00
collecting
f0ccc3108e fix: Copyright 2025-10-06 05:00:49 +00:00
collecting
6e315c09e8 fix: Lanczos Frag 2025-10-06 03:24:35 +00:00
Zephyron
dafdc1c775 fix: resolve C4305 truncation warnings in QColor::fromHsvF calls
Add 'f' suffix to prevent double->float truncation warnings being treated as errors

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-06 12:49:43 +10:00