Commit Graph
23 Commits
Author SHA1 Message Date
Coxxs a6af70baa1 HLE: Implement CreateContextForSystem
Implement nn::ssl::sf::ISslServiceForSystem -> CreateContextForSystem (100)

Ryujinx implements both ISslService and ISslServiceForSystem in one class so we can just return new ISslContext.

Also fixed the incorrect parameter reading order. (CreateContextForSystem basically has same params as CreateContext)
2026-03-14 18:25:36 -05:00
Coxxs 9a684ff066 audio: Fix crash due to invalid Splitter size
Fix crash caused by reading incorrect size of Splitter data.

In most games the crash doesnt happen if you have nn::audio::AudioRendererParameter VoiceCount aligned to 2, as that causes splitter data to be aligned by 0x10, but otherwise, the alignment by 0x10 done in SplitterContext->Update may exceed SplitterSize (which was previously labeled as Unknown24), causing a crash.

(Crash can be replicated by doing AudioRendererParameter.voiceCount++; in any SDK 20.X game that works, which doesn't cause crash on actual hardware)

(This patch is from a friend who makes mods.)
2026-02-01 16:11:46 -06:00
Coxxs a948308a2f HLE: Implement 10106 and 10107 in IPrepoService
In some games using newer SDK (e.g. Splatoon 3 11.0.0), when `nn::prepo::PlayReport::SetOptInCheckEnabled` is set to False, `nn::prepo::PlayReport::Save` will call `IPrepoService:10106` (SaveReport) and `IPrepoService:10107` (SaveReportWithUser) instead of 10104 (SaveReportOld) and 10105 (SaveReportWithUserOld).

A new param (optInCheckEnabled) is added in 10106/10107 compare to 10104/10105.

This should fix missing service error for Splatoon 3 11.0.0 and other games using newer SDK and has set `nn::prepo::PlayReport::SetOptInCheckEnabled` to False.
2026-01-29 20:56:00 -06:00
Coxxs 5a16e24450 gdb: add monitor get mapping
This add the following commands to Gdb Stub:

monitor get mappings
monitor get mappings <address>
monitor get mapping <address>

This is the first time arguments are used in Rcmd, so FindRcmdDelegate is changed to CallRcmdDelegate, to allow it to handle arguments cleanly.

The reply format mimics the same command on Atmosphere.

The forced pagination of monitor get mappings in Atmosphere is not added, as I think it's not needed here.
2025-12-21 23:03:56 -06:00
Coxxs 58a76a0b9f Stub IWriterForApplication: 0 (CreateContextRegistrar)
Fix games that uses ContextRegistrar (e.g. After the socket blocking issue is fixed, Splatoon 3 and other ModuleSystem games will call this when booting, to create a context for the error, after a connection attempt to the server failed.)
2025-11-17 08:42:37 -06:00
Coxxs 2993dba583 Fix application list loads slowly when RyuLDN is enabled
Currently, application list will not show until ApplicationLibrary_LdnGameDataReceived calls ViewModel.RefreshView();, forcing a refresh. This makes application list load slowly when RyuLDN is enabled.
2025-10-24 14:30:38 -05:00
Coxxs f30d832847 Skip directories (and do not RecurseSubdirectories) when finding the icon fallback
Newer applications have a folder for ounce in the Control nca. This fixes Ryujinx trying to open a folder as a file, causing another exception, when trying to find the icon fallback.
2025-10-24 09:47:08 -05:00
Coxxs afa1ab95c2 Move ProcessInfo and Minidump to HleProcessDebugger
This allows developers to call them in the code for debugging.
2025-10-22 16:35:09 -05:00
Coxxs 5d68312b54 gdb: Abort if unable to start GDB server
When users enable GDB stub, we assume they intend to use it (it slows down the game a lot). If the server cannot start, we abort to save users' time troubleshooting why their GDB client can not connect.
2025-10-22 08:10:24 -05:00
Coxxs df36c23652 gdb: fix IsProcess32Bit throws exception if called too early
For some reason, LLDB will call commands that use IsProcess32Bit earlier than GDB.
2025-10-20 21:53:26 -05:00
Coxxs b958044e4e gdb: Support qAttached; Add missing ReplyOK when detach 2025-10-20 21:34:19 -05:00
Coxxs d659bec27a Implement IUserServiceCreator: 1 (CreateClientProcessMonitor)
This should fix nn::ldn::Initialize in games that use SDK 18 or higher.
2025-10-20 20:57:30 -05:00
Coxxs 107df58666 Update LoadIdTokenCache for 19.0.0+
This should stub nn::account::LoadNetworkServiceAccountIdTokenCache for games that use SDK 19 or higher.
2025-10-20 20:57:06 -05:00
Coxxs a2c494e216 gdb: Cleanup
Remove unused function and fix a bug.
2025-10-17 08:26:32 -05:00
Coxxs 35a8116ae8 gdb: Do not skip CheckInterrupt when gdb stub is enabled
When GDB stub is enabled, CheckSynchronization is called too frequently because it skips _nativeContext.SetCounter(MinCountForCheck) (called in CheckInterrupt()), causing CheckSynchronization to be constantly called in JIT. This could cause performance issue.

It also skips the call to the KProcess.InterruptHandler, which causes some games to deadlock when GDB stub is enabled.

I'm not sure if this change will cause any side effects, but it seems GDB stub is still working correctly after this change.

This change will not affect regular users.
2025-10-16 11:07:05 -05:00
Coxxs f5822c16af Flush the error log before exit
Currently, some logs can be missing when a fatal error occurs (especially GuestBrokeExecutionException).

This MR attempts to flush logs to console and file before process exit.
2025-10-13 21:59:20 -05:00
Coxxs b28f52387a gdb: Fix the crash that occurs when GDB is connected early
* "Suspend Application on Start" is on
2025-10-11 21:22:40 -05:00
Coxxs 83412689b7 gdb: Add monitor minidump command
This will dump the process information, stack trace, and registers from all threads to both the Ryujinx log and gdb.
2025-10-11 10:44:00 -05:00
Coxxs 45bf443c01 Fix headless mode
Fix the error

`Error setting value to option 'gdb-stub-port': Check if Option or Value attribute values are set properly for the given type.`

https://github.com/commandlineparser/commandline/issues/612
2025-09-10 13:14:07 -05:00
Coxxs 7fd01214cf gdb: Improve stepping 2025-08-11 15:06:46 -05:00
Coxxs ef72e9b790 Add GDB Stub 2025-08-11 15:06:41 -05:00
Coxxs 6ecd6111d5 fix: UI deadlock when launching a game with "Trace Logs" enabled
This fixes https://github.com/Ryubing/Issues/issues/30

* Switch to "Release" build config (PerformanceCheck(); will only be called in Release build config)

* Enable "Trace Logs" in Ryujinx settings

* Double-click a game to launch

* Ryujinx will attempt to open a confirmation dialog box that never opens, causing UI deadlock
2025-06-20 10:40:29 -05:00
Coxxs a90db3464d fix: socket blocking flag is inverted when setting it 2025-06-13 17:00:28 -05:00