Commit Graph
206 Commits
Author SHA1 Message Date
GreemDev e349ef72fb Use the new C# 14 null propagation setter 2025-11-19 20:09:08 -06:00
KeatonTheBot 139e18a8e1 feature: .NET 10 2025-11-17 09:14:04 -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
KeatonTheBot 6292192cc0 misc: chore: Remove unnecessary usings 2025-11-11 17:40:33 -06:00
GreemDevandcomex 9b8517caf3 Fix socket closing on shutdown
Previously, sockets were only ever closed when the game specifically requested it.

Thanks @comex on GitHub for the patch submitted via the [Ryubing] issues page.

Co-Authored-By: comex <47517+comex@users.noreply.github.com>
2025-11-05 08:21:54 -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
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
KeatonTheBot 86f47b8333 Revert cleanup change in KScheduler.cs
From commit a7af26bc.
2025-10-25 17:57:31 -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
KeatonTheBot d96e93ef0d Missed application pool for 4 GiB DRAM 2025-10-21 13:29:57 -05:00
GreemDev 843a7113d1 chore: fix in-code typos 2025-10-20 21:53:26 -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
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 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
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
KeatonTheBot 41b8b6961c Restore original application pool sizes for DRAM selections 2025-10-15 21:52:24 -05:00
LotPandKeatonTheBot 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
LotP 0b5f312b20 Sync thread name on Schedule
After commit 51ca73cb, using a non-blocking socket (e.g. poll(..., timeout=0)) will still result in a blocking socket.

It appears the above commit inverted the behavior.
This merge request fixes the blocking flag: blocking will be set to false when the flag is 0x800.
2025-10-11 10:42:56 -05:00
LotP c0b7452cb5 SDK20 and REV15 support
* Fixed an issue where games would boot loop because of an incorrect HID state.

  * Turns out the SamplingNumber of the atomic input storage doesn't match the SamplingNumber of the input state held by the atomic storage, instead it is exactly double the value in the input state.

* Added new Condition struct to the HID Shared memory and populate it with dummy data to fix the no-controller crash (already merged).

* The audio renderer has been mostly updated to rev15, allowing rev15 games to launch.

  * Biquad filters now use floats.

  * Several structures have been renamed to match the SDK names, making it easier to compare functionality. A few names are still missing and will be changed at a later date.

  * The new commands from rev15 have been added to the CommandType enum, but they are still missing from the code itself.

    * Due to changes in the SDK layout, the time estimation functions are either missing or very well hidden (or Ghidra search functionality is useless). We can't fully implement the new commands until the timing data has been located.

  * A few minor tweaks to the code have been made to more accurately match the SDK.
2025-10-11 10:39:50 -05:00
KeatonTheBot 51b32981b6 misc: chore: Fix possible NullReferenceExceptions, InvalidOperationExceptions 2025-09-30 15:05:14 -05:00
KeatonTheBot fa682d406e misc: chore: Merge into pattern 2025-09-24 13:51:15 -05:00
KeatonTheBot 503dea74c2 misc: chore: Remove unnecessary usings 2025-09-24 13:48:36 -05:00
KeatonTheBot 1f979e5c6f misc: chore: Fix object creation 2025-09-24 13:44:00 -05:00
KeatonTheBot 378dc33cca misc: chore: Discard unused parameters 2025-09-24 13:26:50 -05:00
KeatonTheBot 9c37a557dd misc: chore: Merge duplicated 'if' branches 2025-09-24 13:26:50 -05:00
Alula 0f2b11d4d5 feat: resolve real module names in HLE debugger 2025-09-20 11:32:15 -05:00
KeatonTheBot fe7a30c747 Revert Android changes
* "Android: NCE support" - Commit cd3221ab

* "Android: Numerous fixes" - Commit 19dd23c2

* "Android: Memory specific switches" - Commit 98b4ff33

* "Android: Remove unmanaged code" - Commit 846b5b6e
2025-09-14 14:51:44 -05:00
LotP dae7ae7eaf Memory changes 2.2
A few more internal changes to the RangeList systems.

* No longer using a QuickAccess dictionary.

  * The performance of the dictionary wasn't much faster than just doing binary searches.

  * Using just binary searches allows us to take advantage of span and array returns as they're are faster than linked lists when iterating or copying the overlaps.

Small code optimizations.

Fixes a few leftover crashes.
2025-09-06 12:26:08 -05:00
LotP f4dfdd35b2 hle: Basic event handle implementation for IApplicationFunctions 210
Lets Hollow Knight: Silksong boot.

* remove stub

* Add version comment
2025-09-05 08:59:26 -05:00
GreemDevandKeatonTheBot c56d04a9a9 feature: Turbo Mode
Adds an elapsed tick multiplier feature which speeds up games which are built upon delta time.

More information: https://web.archive.org/web/20240713135029/https://github.com/Ryujinx/Ryujinx/pull/6456

Co-authored-by: KeatonTheBot <keaton@ryujinx.app>
2025-09-04 23:49:32 -05:00
GreemDev 09f3bf4b55 [ci skip] chore: Change LDN server URL (it's the same server, just a more official URL) 2025-08-28 09:50:29 -05:00
LotP 171624e7f0 Memory Changes part 2
* Slightly refactors RangeLists from the last Memory Changes MR, which fixes issue 61.

* Convert as many const size array iterators to span iterators as possible. When iterating over a const size array, every iteration created a Span, now only the first iteration does in most places.

* Now using object pooling for a few object types that were rapidly deleted and recreated.

* Converted a few flag checks to binary operations to save memory allocations.
2025-08-26 15:30:12 -05:00
LotP 01cb33f658 Memory Changes
* Refactors the RangeList and derivative classes used for handling lists of regions

* The Binary searches are now more performant, relying on edge searches instead of just returning the first matching hit and manually iterating until the edge is found

* Most look-ups now return a RangeItem, which acts as a linked list node now, instead where possible, moving away from Array copies. This should help with some specific lag spikes.

* Made IntrusiveRedBlackTreeNodes act like linked list nodes too to improve the lookup time of minimums, maximums and successors.

* Changed a few cases of HasFlag() into binary operations to save on memory allocations.

In general, [these changes] should increase frame time stability and lag spikes, but at the cost of some overhead to memory look-ups, the result being a very slightly better average fps from my testing (~1-2%).
2025-08-26 15:28:43 -05:00
KeatonTheBot 48c809a80d Revert "Memory Changes"
This reverts commit d5c9bc662c.

Solves crash in Kirby Star Allies after a few mins of gameplay, possibly other titles.
2025-08-17 00:19:01 -05:00
Coxxs ef72e9b790 Add GDB Stub 2025-08-11 15:06:41 -05:00
LotP d5c9bc662c Memory Changes 2025-08-07 11:59:44 -05:00
KeatonTheBot d2a532f971 misc: chore: Fix numerous NullReferenceExceptions, InvalidOperationExceptions 2025-06-18 02:25:06 -05:00
Coxxs a90db3464d fix: socket blocking flag is inverted when setting it 2025-06-13 17:00:28 -05:00
rockingdice 9f0a35ee9b fix: crash caused by cursor overflow
* This fixes a crash that occurred when opening the soft keyboard for the second time
2025-06-10 18:17:48 -05:00
KeatonTheBot e09f16838e Suppress CA1416 warnings, correct argument kind in IFileSystem 2025-06-01 02:26:15 -05:00
MrKev 51ca73cb10 Fix JWT Claims and Socket Flag Handling to Improve Just Dance® Server Connection 2025-05-27 18:28:15 -05:00
KeatonTheBot cd3221abdc Android: NCE support 2025-05-26 16:02:20 -05:00
KeatonTheBot 19dd23c288 Android: Numerous fixes
* GetSerialNumber in ISystemSettingsServer

* Bionic qualifiers

* Revert application pool size to 3285 MB for 4 GB DRAM

* Fix PPTC recompilation if mod or patch is applied
2025-05-26 16:01:23 -05:00