Commit graph

2401 commits

Author SHA1 Message Date
ed4b011cad fix more vulkan issues and remove vertex input (#117)
Co-authored-by: swurl <swurl@swurl.xyz>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/117
Co-authored-by: Aleksandr Popovich <alekpopo@pm.me>
Co-committed-by: Aleksandr Popovich <alekpopo@pm.me>
2025-05-19 21:28:16 +00:00
049cc54f4c fixes vulkan issues and android settings (#105)
- removes provoking vertex, vertex input, dynamic state if not supported
- moves dynamic state to be a 0-3 slider and vertex input its own checkbox
- the rich presence was disabled on linux.
- there were duplicate settings in "edens veil"?
- weird behavior of the vertex input checkbox on per game setting
- adds xenoblade 2 to the d24 conversion control function
- adds the flush logs by line setting to android.
- adds the memory layout setting to android
- Adds the option to show building shaders on the android overlay.

Signed-off-by: Aleksandr Popovich <alekpopo@pm.me>
Co-authored-by: swurl <swurl@swurl.xyz>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/105
Co-authored-by: Aleksandr Popovich <alekpopo@pm.me>
Co-committed-by: Aleksandr Popovich <alekpopo@pm.me>
2025-05-17 20:22:25 +00:00
7e943732bf fix a large variety of issues (#101)
- GLASM/SPIR-V mixup on Android
- potential greenscreen fix (thx suyu)
- save memory layout and add 10gb/12gb options
- potential samsung gaming hub fix
- fix layout of controller UI
- fix default settings to sensible defaults.
- note to TotK that you should increase memory layout
- Error checking for Windows linking
- fix an IDE error
- improved migration system w/threading and busy indicator
- disabled citron migration for now
- replaced some user-facing legacy strings with eden
- Added 10GB and 12GB DRAM layouts
- Fix Android black screen issues
- add discord link & update FAQ/Quickstart
- update links in about page
- add back rich presence
- add Don't show again for desktop pre alpha banner
- add citron warning to android and polaris to desktop

Signed-off-by: swurl <swurl@swurl.xyz>
Co-authored-by: Pavel Barabanov <pavelbarabanov94@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/101
Co-authored-by: swurl <swurl@swurl.xyz>
Co-committed-by: swurl <swurl@swurl.xyz>
2025-05-11 23:58:25 +00:00
7bd606bece Merge https://git.eden-emu.dev/eden-emu/eden 2025-04-30 16:19:06 -03:00
JPikachu
8599c47fe0 service: sm/kernel/loader: Implement QueryPointerBufferSize, automatic pointer buffer sizing, and SM service improvements
This commit introduces multiple improvements to IPC handling and system management services, enhancing game compatibility and emulator stability.

--- 1. Fully Implemented QueryPointerBufferSize Service:
- Exposes the per-process IPC pointer buffer size through `QueryPointerBufferSize` instead of returning stubbed values.
- Added `m_pointer_buffer_size` field to `KProcess`, initialized with a safe default (0x8000).
- Introduced getter and setter methods (`GetPointerBufferSize()` / `SetPointerBufferSize()`).
- Registered new handler in `sm_controller` for handling QueryPointerBufferSize requests.
- Ensures accurate buffer size reporting for games relying on this service.

--- 2. Automatic Pointer Buffer Sizing Per-Game:
- Automatically determines heap size by parsing `main.npdm` from the game’s ExeFS:
  - Heap size > 1 GiB → pointer buffer size set to `0x10000`.
  - Heap size > 512 MiB → pointer buffer size set to `0xC000`.
  - Otherwise, defaults to `0x8000`.
- Gracefully handles missing or malformed `main.npdm` by falling back to default settings.
- Automatically configures pointer buffer size during `AppLoader_NCA::Load`.
- Added logging for heap size detection and buffer size configuration for easier debugging.

--- 3. SM Service Improvements:
- Added full implementation of `QueryPointerBufferSize` within the SM service framework.
- Cleaned up stubbed methods and ensured correct domain handling.
- Registered new service commands (e.g., `SetPointerBufferSize` and `QueryPointerBufferSize`) in `sm_controller`.
- Improved session handling with proper conversion to domain objects where necessary.

--- Benefits:
- Greatly improves compatibility with games that require larger IPC pointer buffers
- Eliminates the need for manual per-game pointer buffer overrides.
- More accurate emulation of Switch system services, improving stability for both commercial titles and homebrew.
- Provides cleaner logging for easier debugging and maintenance.
- Future-proofs IPC handling for upcoming titles with higher memory demands.

--- Additional Notes:
- Default pointer buffer size remains 0x8000 for smaller titles or if heap size cannot be determined.
- Falls back to safe defaults without affecting overall emulator performance.
- All new service calls properly registered and integrated without breaking existing functionality.
2025-04-30 06:35:22 +00:00
JPikachu
e0795f2b40 Service: Add AliasRegionExtraSize
Thanks to Briar for finding and testing the Service
Credit: Antique - [Sudachi] Dev (https://sudachi.emuplace.app/)
2025-04-12 16:23:47 +01:00
JPikachu
4957950b55 revert 789bbd7ab5
This needs to be put aside for now, but may be implemented again later
2025-04-10 03:45:51 +00:00
Zephyron
789bbd7ab5 kernel: Implement SystemResourceSize info type for VAMM initialization
Adds support for InfoType::SystemResourceSize (0x1C) which is required for
proper initialization of the Virtual Address Memory Manager (VAMM). This
implementation:

1. Adds SystemResourceSize to the InfoType enum in svc_types.h
2. Implements the GetInfo handler for SystemResourceSize in svc_info.cpp
3. Returns 512MB (0x20000000 bytes) as the system resource size
4. Adds debug logging for the SVC call

The 512MB value is chosen based on typical system resource allocations
needed for VAMM initialization on the Nintendo Switch.

This fixes crashes in games that rely on VAMM functionality, particularly
during nn::os::detail::VammManager::InitializeIfEnabled().
2025-04-04 03:40:49 +02:00
yuzubot
c280f95b1a "Merge Tagged PR 13018" 2024-03-03 13:02:50 +00:00
FearlessTobi
4d55e58ee4 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
e9dc3bd26b kernel: add and enable system suspend type 2024-02-14 17:03:50 -05:00
Liam
8a14e13295 core: fix multiprocess with nce 2024-02-09 09:20:53 -05:00
Liam
49f10b2e54 am: migrate global state to per-applet state structure 2024-01-29 20:17:33 -05:00
Liam
5942df75fb kernel: clear pinned waiter list on unpin 2024-01-27 22:53:49 -05:00
Liam
507ab2d9b5 kernel: target invalidate to given process 2024-01-22 21:18:52 -05:00
Fernando Sahmkow
28702afb69 Core: Make sure GPU Dirty Managers ae shared by all processes. 2024-01-18 21:12:30 -05:00
liamwhite
f05d1c60be Merge pull request #12677 from GPUCode/whyy-modders
core: Support multiple modules per patcher
2024-01-15 13:52:38 -05:00
GPUCode
26a25d2280 core: Support multiple modules per patcher 2024-01-15 00:46:05 +02:00
Liam
b31c464b90 kernel: optimize page free on shutdown 2024-01-12 19:19:07 -05:00
Liam
bf50a0e0c2 kernel: fix debugger and process list lifetime 2024-01-12 18:31:33 -05:00
Liam
12fe8c5b76 kernel: fix page leak on process termination 2024-01-12 18:31:33 -05:00
Viktor Szépe
cff668e1c4 Fix typos in src/core (#12625)
* Fix typos in src/core

* Fix typo correction

* Fix indentation of MemoryStateNames

* Fix indent
2024-01-08 13:31:48 -06:00
Merry
d4bb92866b KThread: Send termination interrupt to all cores a thread has affinity to
KThread::RequestTerminate may run from a thread which is not the CurrentCore, and thus
masking this out is erroneous.
2024-01-02 21:34:34 +00:00
Narr the Reg
7a478d7b9a Merge pull request #12454 from liamwhite/ct-stuff
core_timing: minor refactors
2024-01-01 13:56:31 -06:00
Narr the Reg
5dbd02ebb1 Merge pull request #12466 from liamwhite/sh2
core: track separate heap allocation for linux
2024-01-01 13:56:16 -06:00
Liam
c421e9e729 k_capabilities: simplify KTrace map skip logic 2023-12-28 01:22:57 -05:00
liamwhite
acc826f8fa Merge pull request #12455 from liamwhite/end-wait
kernel: use simple mutex for object list container
2023-12-26 11:46:19 -05:00
Liam
c366d8e8d9 core: track separate heap allocation for linux 2023-12-25 23:30:56 -05:00
Liam
ac1e946390 kernel: remove unecessary process member from handle table 2023-12-24 19:23:03 -05:00
Liam
6bd1dfa8cc service: fetch objects from the client handle table 2023-12-24 19:20:43 -05:00
Liam
ad4d66a5db kernel: use simple mutex for object list container 2023-12-23 16:26:07 -05:00
Liam
468ef514f1 core_timing: use static typing for no-wait unschedule 2023-12-23 15:36:46 -05:00
Liam
b9545c5a0e core_timing: remove user data value 2023-12-23 15:36:44 -05:00
Liam
3d08a55a87 kernel: fix resource limit imbalance 2023-12-22 21:52:49 -05:00
Liam
a7ff872a4c kernel: restrict nce to applications 2023-12-22 21:52:49 -05:00
Liam
1fdcd70bad general: properly support multiple memory instances 2023-12-22 21:52:49 -05:00
Liam
8243f4e3c7 k_server_session: remove scratch buffer usage in favor of direct copy 2023-12-22 21:52:49 -05:00
Liam
5244690809 k_server_session: process for guest servers 2023-12-22 21:52:49 -05:00
Liam
e2b5f2392e kernel: instantiate memory separately for each guest process 2023-12-22 21:52:49 -05:00
liamwhite
0116c74ba7 Merge pull request #12358 from liamwhite/optimized-alloc
common: use memory holepunching when clearing memory
2023-12-16 11:47:03 -05:00
Liam
1075c88dca common: use memory holepunching when clearing memory 2023-12-14 23:44:33 -05:00
Narr the Reg
6de39c8398 service: hid: Allow to create multiple instances of shared memory 2023-12-13 23:24:28 -06:00
liamwhite
12b8cd2ffb Merge pull request #12317 from liamwhite/sc-fix
kernel: fix single core
2023-12-10 18:16:58 -05:00
liamwhite
7d3fe08d79 Merge pull request #12321 from liamwhite/ro2
ro: add separate ro service
2023-12-10 18:16:50 -05:00
liamwhite
4907a83298 Merge pull request #12296 from liamwhite/client-session
kernel: implement remaining IPC syscalls
2023-12-09 19:03:56 -05:00
Liam
662bc7c6a1 service: populate pid and handle table from client 2023-12-09 13:45:25 -05:00
Liam
f85425fe86 kernel: fix single core 2023-12-08 20:31:18 -05:00
Liam
f486fe3971 kernel: implement light IPC 2023-12-07 09:13:43 -05:00
Liam
dcc9df5dd2 kernel: implement remaining IPC syscalls 2023-12-06 17:33:00 -05:00
Liam
3d5c6a73cb core: refactor emulated cpu core activation 2023-12-04 10:37:16 -05:00