Commit Graph

7256 Commits

Author SHA1 Message Date
Zephyron
bc82a4f41b service: vi: Remove stubbed warning from GetManagerDisplayService
- The GetManagerDisplayService function in IApplicationDisplayService is fully implemented, so remove the stubbed warning and change the log level to DEBUG to match its implementation status.
2025-05-11 12:17:03 +01:00
Zephyron
75c7b8a672 fix(sm_controller): Correct QueryPointerBufferSize implementation
- Updated the QueryPointerBufferSize function to return the correct u16 pointer buffer size.
- Ensured the function logs its call at the debug level.
- Used IPC::ResponseBuilder to construct the response with the correct buffer size.

This change addresses the stubbed implementation and ensures compliance with the HIPC protocol.
2025-05-11 12:17:03 +01:00
Zephyron
b3ff92116e fix: Implement SetGestureOutputRanges to handle unimplemented function error
- Added the SetGestureOutputRanges function to the IHidServer class to address the unimplemented function '92' error.
- This fix was discovered through log analysis, which showed a critical assertion failure in the HID service for an unknown function '92'.
- The log indicated a userspace panic and backtrace, pointing to the need for implementing this function to prevent execution breaks.
- Updated CMakeLists.txt to remove specific version requirements for several packages, enhancing flexibility.
- Updated subproject commit references for VulkanMemoryAllocator and vcpkg.

- REF: https://switchbrew.org/wiki/HID_services#ActivateGesture
2025-05-11 12:17:03 +01:00
Zephyron
455992c2a7 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-05-11 12:17:03 +01:00
Zephyron
4f61ee284f core: Improve device memory and buffer queue handling
This commit makes several improvements to device memory management and buffer
queue handling:

DeviceMemoryManager:
- Add null pointer and size checks for ReadBlock
- Fill unmapped memory with a known pattern (0xCC) instead of zeros
- Add better error logging for invalid memory accesses
- Add null pointer check for source pointer in memcpy

BufferQueueProducer:
- Improve error handling in WaitForFreeSlotThenRelock
- Add proper abandoned state checking during wait conditions
- Clean up and simplify buffer scanning logic
- Improve logging messages with more descriptive information
- Remove redundant buffer count validation
- Fix potential infinite loop condition during wait

These changes improve stability and error handling while making the code more
maintainable and debuggable. The use of a known pattern for unmapped memory
helps identify uninitialized memory access issues.
2025-05-11 12:17:03 +01:00
Zephyron
2e739c8692 service/am: Implement friend invitation storage channel
Implements TryPopFromFriendInvitationStorageChannel to properly handle
friend invitation data storage and retrieval. This includes:

- Add ResultNoData error code to am_results.h
- Add friend_invitation_storage_channel storage queue to Applet struct
- Implement proper data handling in TryPopFromFriendInvitationStorageChannel

The implementation now properly manages a queue of friend invitation data
and returns appropriate results based on data availability.
2025-05-11 12:17:03 +01:00
Zephyron
f1afe954ec nvdrv: Fix incorrect IoctlZbcSetTable structure size assertion
Resolves a build failure caused by a mismatch between the defined and expected size of the `IoctlZbcSetTable` structure in `nvhost_ctrl_gpu`. The `static_assert` incorrectly expected the size to be 44 bytes, while the actual size was 48 bytes.

Changes include:
- Updated `static_assert` to correctly reflect the 48-byte size of `IoctlZbcSetTable`.
- Verified packing and alignment to ensure compliance with hardware specifications.
- Reviewed and confirmed correctness of `u32` type definitions.

This fix addresses a regression introduced in commit 9be4bf9aa5, which implemented ZBCSetTable functionality, and ensures successful compilation and adherence to the ZBC table implementation's design.
2025-05-11 12:17:03 +01:00
Zephyron
de5f95c477 nvdrv: Implement ZBCSetTable functionality
Implements basic Zero Bandwidth Clear (ZBC) table support in nvhost_ctrl_gpu.
This adds storage and validation for both color and depth clear values,
replacing the previous stub implementation. ZBC is a hardware optimization
technique used by NVIDIA GPUs to efficiently handle buffer clearing operations.

Changes include:
- Added ZBC table storage structures
- Implemented parameter validation
- Added separate handling for color and depth modes
- Improved debug logging
- Added documentation explaining ZBC functionality
2025-05-11 12:17:03 +01:00
Zephyron
57fee6e570 core: Add support for 10GB and 12GB memory configurations
- Add Memory_10Gb and Memory_12Gb to MemoryLayout enum
- Update memory layout settings to support up to 12GB
- Add SMC enums for 10GB and 12GB memory sizes and arrangements
- Increase MainMemorySizeMax from 8GB to 12GB
- Add memory pool size calculations for 10GB and 12GB configurations
- Update UI translations for new memory options
2025-05-11 12:17:03 +01:00
yuzubot
f4b721ac06 "Merge Tagged PR 13018" 2025-05-11 12:17:03 +01:00
Zuckerwatte1
30cf1e08c5 Add 12gb DRAM option (#90)
This adds the option to allow the emulator to use 12gb of RAM for something like really big texture packs.

Co-authored-by: smiRaphi <neogt404@gmail.com>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/90
Co-authored-by: Zuckerwatte1 <zuckerwatte1@noreply.localhost>
Co-committed-by: Zuckerwatte1 <zuckerwatte1@noreply.localhost>
2024-12-20 15:24:58 +00:00
EmulationEnjoyer
a8405749cb chore(HLE): Update HLE API version constants
- Updated Horizon OS version to 19.0.1 and NintendoSDK version to 1.0. Adjusted `VERSION_HASH`, `DISPLAY_VERSION`, and `DISPLAY_TITLE` to match the new firmware versions.

ref: fcb6444037
2024-12-20 15:24:58 +00:00
EmulationEnjoyer
8f4e5de1a4 core: Add new error modules to ErrorModule enum
- Add support for homebrew error modules to improve error handling
2024-12-20 15:24:58 +00:00
EmulationEnjoyer
f0d0c16733 feat: update HLE API version constants to Horizon OS 19.0.0
- Updated Horizon OS version constants from 12.1.0 to 19.0.0.
- Changed the version hash from `76b10c2dab7d3aa73fc162f8dff1655e6a21caf4` to `52971eebbba7ab9e6e23d73753aa63e0c3794b16`.
- Updated `DISPLAY_TITLE` and `DISPLAY_VERSION` to reflect the new firmware version "NintendoSDK Firmware for NX 19.0.0-4.0".
- Incremented Atmosphere release version constants to 1.8.0.

ref: 3276bf8780
2024-12-20 15:24:58 +00:00
lui
b76a6a79bc externals: update fmt to 11.0.2 and vcpkg to 2024.09.30 (#68)
Updated to fmt 11 with the required source changes for it to work.

Also updated vcpkg for this, and as an added benefit it fixes the `Unable to find a valid Visual Studio instance` error, and the VS 2019 build tools are no longer required. Just make sure to delete the existing downloaded vcpkg tool and binaries in `externals/vcpkg` if you have compiled before, or else it will continue to use the old version and give the error.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/68
Co-authored-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Co-committed-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
2024-12-20 15:24:58 +00:00
Herman Semenov
7bebaad1bf Using reserve() for optimization inserts, marked unused pair items and minor code refactor 2024-12-20 15:24:58 +00:00
echosys
8ba1e751c4 Be more explicit on struct init (#46)
Older versions of gcc (gcc-11 which is used in the build guide) seem to struggle with these two struct initializations (if I understand this correctly it is using "designated initialization" which is new in C++20) leading to compile errors (see #42).
This replaces those two initializations with a more explicit one that also compiles on gcc-11.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/46
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-12-20 15:24:58 +00:00
spectranator
685f07c068 Added ILibraryAppletSelfAccessor::UnpopInData stub 2024-12-20 15:24:58 +00:00
Reg Tiangha
4c7af937f1 hardware_composer.cpp: Add missing includes 2024-12-20 15:24:57 +00:00
Jarrod Norwell
2084af908c Stubbed QueryLastPlayTime 2024-12-20 15:24:57 +00:00
Jarrod Norwell
cc3e48774c Added HDCP authentication state event and stubs 2024-12-20 15:24:57 +00:00
Jarrod Norwell
2b4befd23d Added ISslConnection::{Get,Set}NextAlpnProto stubs 2024-12-20 15:24:57 +00:00
Jarrod Norwell
2cacc52680 Added missing error codes and increased audio renderer revision (fixes Animal Well) 2024-12-20 15:24:57 +00:00
Mike Lothian
c39939fd8e Use fmt 11.0.0 2024-12-20 15:24:57 +00:00
Jarrod Norwell
ec78bac6ab Rewrote mm:u to follow switchbrew.org documentation 2024-12-20 15:24:57 +00:00
lol
b6cd4b66b2 fix qlaunch on firmware 18 2024-12-20 15:24:57 +00:00
Exverge
f0437e57fd Map methods in firmware 18.0.0 2024-12-20 15:24:57 +00:00
darktux
2c04264053 Implemented IFriendService::GetUserPresenceView stub to get QLaunch friends list running 2024-12-20 15:24:57 +00:00
darktux
c454967221 Return correct amount of values from IFriendService::GetReceivedFriendRequestCount 2024-12-20 15:24:57 +00:00
darktux
0ef53d4d96 Added v18.0.0 stubs 2024-12-20 15:24:57 +00:00
darktux
075c4782e0 Implemented a more correct version of ISfServiceMonitor::GetGroupInfo 2024-12-20 15:24:57 +00:00
darktux
628a1649e3 Actually return 0 in IFriendService::GetReceivedFriendRequestCount 2024-12-20 15:24:57 +00:00
darktux
662ce7f3a0 Fixed minor issues from previous PR related to buffers and a typo in npns 2024-12-20 15:24:57 +00:00
darktux
e6d40911b3 Always report command ID in log and implement LoadUserSetting stub 2024-12-20 15:24:57 +00:00
Belal Ashraf
6cca22e167 Fix NROs crashing and loading infinitely 2024-12-20 15:24:57 +00:00
Exverge
1a561852bb fix: resume application when library applets are closed 2024-12-20 15:24:57 +00:00
RadsammyT
7117eddfa4 PR#3 review: -l's arg is now optional 2024-12-20 15:24:57 +00:00
RadsammyT
7a643511cb suyu_cmd: allow launching of applets by supplying FrontendAppletParameters as an arg
Based off of a patch i saved before I nuked my local copy of the suyu repo from gitlab and replaced it with the one local-hosted
2024-12-20 15:24:57 +00:00
niansa
3e107158c2 Apply GetGroupInfo fix to ISfServiceMonitor too 2024-12-20 15:24:57 +00:00
niansa
591a4b7495 Implemented some stubs for Health & Safety and corrected GetGroupInfo behavior 2024-12-20 15:24:57 +00:00
niansa
275fd0c7dc Stub out StartSleepSequence 2024-12-20 15:24:57 +00:00
niansa
4878379533 Implemented some basic sleep functions 2024-12-20 15:24:57 +00:00
niansa
66e36e1066 Implement option to start QLaunch from Tools menu 2024-12-20 15:24:57 +00:00
niansa
9b4ef19ed9 Port changes from Early Access 2024-12-20 15:24:40 +00:00
Andrea V
44c92bf62e Introduced default constructors to fix compile 2024-12-20 15:14:22 +00:00
liamwhite
dc94882c90
Merge pull request #13135 from german77/hid-interface
service: hid: Migrate HidServer to new IPC
2024-02-27 12:26:26 -05:00
Liam
c7174d5f61 general: fix asan errors 2024-02-26 19:28:49 -05: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
d66ca8b731 video_core: make gpu context aware of rendering program 2024-02-26 11:16:14 -05:00
Liam
4050242cf3 ldn: return no connection from GetStateForMonitor 2024-02-24 22:56:08 -05:00