Commit graph

3798 commits

Author SHA1 Message Date
KeatonTheBot
457f62d773 nuget: bump packages
* Gommon to 2.8.0.1

* Microsoft.NET.Test.Sdk to 18.0.0

* Newtonsoft.Json to 13.0.4 (reduces trim warnings by 56)

* Ryujinx.LibHac to 0.21.0-alpha.126

* System group to 9.0.10

* UnicornEngine.Unicorn to 2.1.4-a40db6c
2025-11-02 20:42:23 -06:00
KeatonTheBot
a6c0eabf49 misc: Tweak NullReferenceException fixes 2025-10-31 01:04:00 -05:00
LotP
e3ee28605d Memory changes 3
General memory improvements to decrease GC pressure and frequency.

Pool big arrays and objects that are created and deleted often.

Skip data copies when they aren't needed.

Inline flag checks to skip unneeded allocations.

From my testing the performance is about the same, but the GC frequency is much lower and collection is faster causing less and smaller spikes.
2025-10-30 23:25:51 -05:00
KeatonTheBot
2c50fbcc1f misc: Use nint/nuint instead of IntPtr/UIntPtr 2025-10-29 14:54:07 -05:00
GreemDev
90cb9d42db hle: Throw a ServiceNotImplementedException instead of ArgumentException if any number arguments provided to ILibraryAppletAccessor are nonzero 2025-10-29 14:52:15 -05:00
LotP
1a3b407839 ILibraryAppletAccessor:90 tweak
Minor update to logic to make our work easier in the future.
2025-10-29 14:52:13 -05:00
sh0inx
46a0783293 HLE: Stub ILibraryAppletAccessor Unknown90
This lets games such as The Legend of Zelda: Tears of the Kingdom (v1.4.2) and other SDK 20+ games successfully circumvent a crash when calling an applet.

Example: No controller connected on boot -> calls Controller Applet -> no stub = crash.
2025-10-27 13:11:33 -05:00
KeatonTheBot
82ae055fe5 Code cleanup: Audio effects fix and audio object pooling
Commit cdbe5686
2025-10-26 17:33:51 -05:00
LotP
f98af9e175 gpu allocation optimizations
ObjectPool now uses ConcurrentBag instead if ConcurrentStack, as it has a smaller memory footprint.

Fix compiler warnings related to Audio Command Pools.

Switch gpu command initialization to use pointers, that way skipping the allocation of the command which is unnecessary.

Skip byte array allocation in Ioctl2/3 if it isn't needed (if the source data is all continuous we don't need to copy it to make it continuous).
2025-10-26 16:46:55 -05:00
LotP
cdbe568620 audio effects fix and audio object pooling
Revert and reimplement Float BiquadFilterEffect support, fixes infinite load issues in a few games like Splatoon 3.

Fix incorrect string check with the new thread naming system.

Implement object pooling for all Audio Commands and a few other audio related objects and use a growing error list for updating wave buffers instead of always allocating space for 8 errors.
2025-10-25 23:49:52 -05:00
KeatonTheBot
86f47b8333 Revert cleanup change in KScheduler.cs
From commit a7af26bc.
2025-10-25 17:57:31 -05: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
GreemDev
e720e4a87b gdb: YACC (yet another cleanup commit) 2025-10-24 09:47:08 -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
GreemDev
52b6fcf1a4 gdb: some more cleanups 2025-10-22 15:25:33 -05:00
GreemDev
35449846d9 gdb: Make waiting for a process to start more forgiving (200ms per poll 10x -> 500ms) 2025-10-22 08:10:25 -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
GreemDev
b8aaadac5f gdb: Catch SocketException from TcpListener#Start 2025-10-22 08:09:48 -05:00
KeatonTheBot
a369b246a3 Fix Ori 2 not launching (revert Possible NullReferenceException change) 2025-10-21 16:43:03 -05:00
KeatonTheBot
d96e93ef0d Missed application pool for 4 GiB DRAM 2025-10-21 13:29:57 -05:00
GreemDev
0bfd2ad3ef gpu: tweak: Do not log missing Votevtg implementation. 2025-10-21 13:25:32 -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
GreemDev
843a7113d1 chore: fix in-code typos 2025-10-20 21:53:26 -05:00
GreemDev
2d420ee561 gdb: dynamic rcmd system & more cleanups 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
KeatonTheBot
280461dc78 Update NUnit to 4.4.0
* NUnit3TestAdapter to 5.2.0

* Rename Assert class to ClassicAssert to align with NUnit 4.x changes
2025-10-19 23:01:06 -05:00
KeatonTheBot
1724149443 misc: chore: Remove unnecessary usings 2025-10-19 17:48:37 -05:00
Xam
b44e2a87fd Fix duplicate volume and mode change events in AppHost 2025-10-19 17:47:12 -05:00
Xam
b1f767b2d5 Input: AvaloniaMouseDriver: fix native touch inputs 2025-10-19 17:46:22 -05:00
Xam
ec9713b111 Horizon: Audio: HwopusIpcServer: fix random crashes regression in Pokemon Quest 2025-10-19 17:45:43 -05:00
GreemDev
a7af26bc1f gdb: More cleanup changes
- Move the message handler into its debugger class part,
- Move all message types into one file and collapse 3 of the ones with no data into a generic, stateless message with a single property being its type,
- Add an Fpscr helper property on IExecutionContext along with a comment about what Fpscr is (similar to the other registers in there)
- Moved the Rcmd helpers (such as GetRegisters, GetMinidump, etc) into a dedicated Debugger class part,
- Fixed the double-collection (ToArray being called twice) in GetThreadUids & GetThread in KProcess
2025-10-19 09:56:08 -05:00
GreemDev
91a5f69805 gdb: more cleanups
- convert GdbRegisters utilities into extensions on IExecutionContext

- add a Write/Read Register helper on Debugger that handles 32/64 bit instead of doing that for every usage of register reading/writing
2025-10-18 09:50:01 -05:00
GreemDev
f908bfe150 gdb: Code cleanup pass #2
Moved the reply functionality into the command processor, move the main debugger thread into a dedicated class part, and more
2025-10-17 08:27:13 -05:00
Coxxs
a2c494e216 gdb: Cleanup
Remove unused function and fix a bug.
2025-10-17 08:26:32 -05:00
GreemDev
e489e0d19f gdb: Cleanup Debugger.cs
by moving the GDB command handlers and command processor out of the class and into their own
2025-10-17 08:23:54 -05:00
KeatonTheBot
f362e33293 12 GiB heap crash workaround
Using resolution mods, heaps past 8 GiB work in some games (like LoZ: TotK) and not in others (like SMP Jamboree). Setting the heap to a hard limit of 8 GiB on the 10 & 12 GiB DRAM options seems to be the safe bet right now until a better solution is found.
2025-10-16 15:38:34 -05:00
GreemDev
1e2fd6f4c2 misc: Update Ryujinx.LibHac
Match the behavior with AMS: c8e39a54d2/libraries/libstratosphere/source/fssystem/fssystem_aes_ctr_counter_extended_storage.cpp (L93)

This should fix the error ResultFs.InvalidArgument (2002-6001) in some nca.

Co-authored-by: Coxxs <58-coxxs@users.noreply.git.ryujinx.app>
2025-10-16 13:40:52 -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
KeatonTheBot
41b8b6961c Restore original application pool sizes for DRAM selections 2025-10-15 21:52:24 -05:00
LotP
42727fca07 12 GiB heap support
The heap was limited to 6 GiB no matter the memory setting, causing memory configurations above 8 GiB to not actually affect the heap size.

Now when the memory config is set to [10 or] 12 GiB the heap also allocates 12 GiB.

The SetHeapSize SysCall will now allow heap sizes up to 12 GiB (technically slightly less).

Co-authored-by: KeatonTheBot <keaton@ryujinx.app>
2025-10-15 21:49:11 -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
GreemDev
66a5719e10 UI: Move IgnoreControllerApplet to the System config section object 2025-10-12 21:48:26 -05:00
KeatonTheBot
cc2fb8f0b6 UI: Fix line breaks in Turbo Mode tooltips 2025-10-12 21:48:26 -05:00
Goodfeat
c9c78841b9 feature: add the ability to skip profile select dialog when opening games that use it
the skip behavior is done by passing the user id of the profile you have selected in Options > Manage User Profiles
2025-10-12 21:48:25 -05:00
KeatonTheBot
f26bd3d321 UI: Update FluentAvalonia.NoAnim to 2.4.0-build3 2025-10-12 18:31:34 -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