<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Ryujinx/Ryujinx.HLE/HOS/Kernel, branch master</title>
<subtitle>A backup of the Ryujinx master git branch.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/'/>
<entry>
<title>Move solution and projects to src</title>
<updated>2023-04-27T21:51:14+00:00</updated>
<author>
<name>TSR Berry</name>
<email>20988865+TSRBerry@users.noreply.github.com</email>
</author>
<published>2023-04-07T23:22:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/commit/?id=cee712105850ac3385cd0091a923438167433f9f'/>
<id>cee712105850ac3385cd0091a923438167433f9f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing check for thread termination on ArbitrateLock (#4722)</title>
<updated>2023-04-25T22:33:14+00:00</updated>
<author>
<name>gdkchan</name>
<email>gab.dark.100@gmail.com</email>
</author>
<published>2023-04-25T22:33:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/commit/?id=097562bc6c227c42f803ce1078fcb4adf06cd20c'/>
<id>097562bc6c227c42f803ce1078fcb4adf06cd20c</id>
<content type='text'>
* Add missing check for thread termination on ArbitrateLock

* Use TerminationRequested in all places where it can be used</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add missing check for thread termination on ArbitrateLock

* Use TerminationRequested in all places where it can be used</pre>
</div>
</content>
</entry>
<entry>
<title>Reducing Memory Allocations 202303 (#4624)</title>
<updated>2023-04-24T02:06:23+00:00</updated>
<author>
<name>jhorv</name>
<email>38920027+jhorv@users.noreply.github.com</email>
</author>
<published>2023-04-24T02:06:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/commit/?id=666e05f5cb9aa9dc86874823c108586e7a5b38bd'/>
<id>666e05f5cb9aa9dc86874823c108586e7a5b38bd</id>
<content type='text'>
* use ArrayPool, avoid 6000-7000 allocs/sec of runtime

* use ArrayPool, avoid ~7k allocs/second during game execution

* use ArrayPool, avoid ~3000 allocs/sec during game execution

* use MemoryPool, reduce 0.5 MB/sec of new allocations during game execution

* avoid over-allocation by setting List&lt;&gt; Capacity when known

* remove LINQ in KTimeManager.UnscheduleFutureInvocation

* KTimeManager - avoid spinning one more time when the time has arrived

* KTimeManager - let SpinWait decide when to Thread.Yield(), and don't SpinOnce() immediately after Thread.Yield()

* use MemoryPool, reduce ~175k bytes/sec allocation during game execution

* IpcService - call commands via dynamic methods instead of reflection .Invoke(). Faster to call and with fewer allocations because parameters can be passed directly instead of as an array

* Make ButtonMappingEntry a record struct to avoid allocations. Set the List&lt;ButtonMappingEntry&gt; capacity according to use.

* add MemoryBuffer type for working with MemoryPool&lt;byte&gt;

* update changes to use MemoryBuffer

* make parameter ReadOnlySpan instead of Span

* whitespace fix

* Revert "IpcService - call commands via dynamic methods instead of reflection .Invoke(). Faster to call and with fewer allocations because parameters can be passed directly instead of as an array"

This reverts commit f2c698bdf65f049e8481c9f2ec7138d9b9a8261d.

* tweak KTimeManager spin behavior

* replace MemoryBuffer with ByteMemoryPool modeled after System.Buffers.ArrayMemoryPool&lt;T&gt;

* make ByteMemoryPoolBuffer responsible for renting memory</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* use ArrayPool, avoid 6000-7000 allocs/sec of runtime

* use ArrayPool, avoid ~7k allocs/second during game execution

* use ArrayPool, avoid ~3000 allocs/sec during game execution

* use MemoryPool, reduce 0.5 MB/sec of new allocations during game execution

* avoid over-allocation by setting List&lt;&gt; Capacity when known

* remove LINQ in KTimeManager.UnscheduleFutureInvocation

* KTimeManager - avoid spinning one more time when the time has arrived

* KTimeManager - let SpinWait decide when to Thread.Yield(), and don't SpinOnce() immediately after Thread.Yield()

* use MemoryPool, reduce ~175k bytes/sec allocation during game execution

* IpcService - call commands via dynamic methods instead of reflection .Invoke(). Faster to call and with fewer allocations because parameters can be passed directly instead of as an array

* Make ButtonMappingEntry a record struct to avoid allocations. Set the List&lt;ButtonMappingEntry&gt; capacity according to use.

* add MemoryBuffer type for working with MemoryPool&lt;byte&gt;

* update changes to use MemoryBuffer

* make parameter ReadOnlySpan instead of Span

* whitespace fix

* Revert "IpcService - call commands via dynamic methods instead of reflection .Invoke(). Faster to call and with fewer allocations because parameters can be passed directly instead of as an array"

This reverts commit f2c698bdf65f049e8481c9f2ec7138d9b9a8261d.

* tweak KTimeManager spin behavior

* replace MemoryBuffer with ByteMemoryPool modeled after System.Buffers.ArrayMemoryPool&lt;T&gt;

* make ByteMemoryPoolBuffer responsible for renting memory</pre>
</div>
</content>
</entry>
<entry>
<title>HLE: Refactoring of ApplicationLoader (#4480)</title>
<updated>2023-03-31T19:16:46+00:00</updated>
<author>
<name>Ac_K</name>
<email>Acoustik666@gmail.com</email>
</author>
<published>2023-03-31T19:16:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/commit/?id=4c2d9ff3ff9d7afb1fd0bd764bee5931fa5f053c'/>
<id>4c2d9ff3ff9d7afb1fd0bd764bee5931fa5f053c</id>
<content type='text'>
* HLE: Refactoring of ApplicationLoader

* Fix SDL2 Headless

* Addresses gdkchan feedback

* Fixes LoadUnpackedNca RomFS loading

* remove useless casting

* Cleanup and fixe empty application name

* Remove ProcessInfo

* Fixes typo

* ActiveProcess to ActiveApplication

* Update check

* Clean using.

* Use the correct filepath when loading Homebrew.npdm

* Fix NRE in ProcessResult if MetaLoader is null

* Add more checks for valid processId &amp; return success

* Add missing logging statement for npdm error

* Return result for LoadKip()

* Move error logging out of PFS load extension method

This avoids logging "Could not find Main NCA"
followed by "Loading main..." when trying to start hbl.

* Fix GUIs not checking load results

* Fix style and formatting issues

* Fix formatting and wording

* gtk: Refactor LoadApplication()

---------

Co-authored-by: TSR Berry &lt;20988865+TSRBerry@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* HLE: Refactoring of ApplicationLoader

* Fix SDL2 Headless

* Addresses gdkchan feedback

* Fixes LoadUnpackedNca RomFS loading

* remove useless casting

* Cleanup and fixe empty application name

* Remove ProcessInfo

* Fixes typo

* ActiveProcess to ActiveApplication

* Update check

* Clean using.

* Use the correct filepath when loading Homebrew.npdm

* Fix NRE in ProcessResult if MetaLoader is null

* Add more checks for valid processId &amp; return success

* Add missing logging statement for npdm error

* Return result for LoadKip()

* Move error logging out of PFS load extension method

This avoids logging "Could not find Main NCA"
followed by "Loading main..." when trying to start hbl.

* Fix GUIs not checking load results

* Fix style and formatting issues

* Fix formatting and wording

* gtk: Refactor LoadApplication()

---------

Co-authored-by: TSR Berry &lt;20988865+TSRBerry@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Reducing memory allocations (#4537)</title>
<updated>2023-03-17T12:14:50+00:00</updated>
<author>
<name>jhorv</name>
<email>38920027+jhorv@users.noreply.github.com</email>
</author>
<published>2023-03-17T12:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/commit/?id=5131b71437b36f9b876046a2fddd5465652e0f10'/>
<id>5131b71437b36f9b876046a2fddd5465652e0f10</id>
<content type='text'>
* add RecyclableMemoryStream dependency and MemoryStreamManager

* organize BinaryReader/BinaryWriter extensions

* add StreamExtensions to reduce need for BinaryWriter

* simple replacments of MemoryStream with RecyclableMemoryStream

* add write ReadOnlySequence&lt;byte&gt; support to IVirtualMemoryManager

* avoid 0-length array creation

* rework IpcMessage and related types to greatly reduce memory allocation by using RecylableMemoryStream, keeping streams around longer, avoiding their creation when possible, and avoiding creation of BinaryReader and BinaryWriter when possible

* reduce LINQ-induced memory allocations with custom methods to query KPriorityQueue

* use RecyclableMemoryStream in StreamUtils, and use StreamUtils in EmbeddedResources

* add constants for nanosecond/millisecond conversions

* code formatting

* XML doc adjustments

* fix: StreamExtension.WriteByte not writing non-zero values for lengths &lt;= 16

* XML Doc improvements. Implement StreamExtensions.WriteByte() block writes for large-enough count values.

* add copyless path for StreamExtension.Write(ReadOnlySpan&lt;int&gt;)

* add default implementation of IVirtualMemoryManager.Write(ulong, ReadOnlySequence&lt;byte&gt;); remove previous explicit implementations

* code style fixes

* remove LINQ completely from KScheduler/KPriorityQueue by implementing a custom struct-based enumerator</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* add RecyclableMemoryStream dependency and MemoryStreamManager

* organize BinaryReader/BinaryWriter extensions

* add StreamExtensions to reduce need for BinaryWriter

* simple replacments of MemoryStream with RecyclableMemoryStream

* add write ReadOnlySequence&lt;byte&gt; support to IVirtualMemoryManager

* avoid 0-length array creation

* rework IpcMessage and related types to greatly reduce memory allocation by using RecylableMemoryStream, keeping streams around longer, avoiding their creation when possible, and avoiding creation of BinaryReader and BinaryWriter when possible

* reduce LINQ-induced memory allocations with custom methods to query KPriorityQueue

* use RecyclableMemoryStream in StreamUtils, and use StreamUtils in EmbeddedResources

* add constants for nanosecond/millisecond conversions

* code formatting

* XML doc adjustments

* fix: StreamExtension.WriteByte not writing non-zero values for lengths &lt;= 16

* XML Doc improvements. Implement StreamExtensions.WriteByte() block writes for large-enough count values.

* add copyless path for StreamExtension.Write(ReadOnlySpan&lt;int&gt;)

* add default implementation of IVirtualMemoryManager.Write(ulong, ReadOnlySequence&lt;byte&gt;); remove previous explicit implementations

* code style fixes

* remove LINQ completely from KScheduler/KPriorityQueue by implementing a custom struct-based enumerator</pre>
</div>
</content>
</entry>
<entry>
<title>Update syscall capabilites to include SVCs from FW 15.0.0 (#4530)</title>
<updated>2023-03-17T11:55:19+00:00</updated>
<author>
<name>TSRBerry</name>
<email>20988865+TSRBerry@users.noreply.github.com</email>
</author>
<published>2023-03-17T11:55:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/commit/?id=7870423671cba17c8aad9bb93a67c84bda441366'/>
<id>7870423671cba17c8aad9bb93a67c84bda441366</id>
<content type='text'>
* Add CapabilityType enum

* Add SupervisorCallCount

* kernel: Add CapabilityExtensions &amp; Change type of capabilities to uint

* Remove private setter from Mask arrays

* Pass ReadOnlySpan directly &amp; Remove redundant type casts</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add CapabilityType enum

* Add SupervisorCallCount

* kernel: Add CapabilityExtensions &amp; Change type of capabilities to uint

* Remove private setter from Mask arrays

* Pass ReadOnlySpan directly &amp; Remove redundant type casts</pre>
</div>
</content>
</entry>
<entry>
<title>Misc performance tweaks (#4509)</title>
<updated>2023-03-11T20:05:48+00:00</updated>
<author>
<name>jhorv</name>
<email>38920027+jhorv@users.noreply.github.com</email>
</author>
<published>2023-03-11T20:05:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/commit/?id=23c844b2aa84a65e573dcc023d19b8f5294a8baf'/>
<id>23c844b2aa84a65e573dcc023d19b8f5294a8baf</id>
<content type='text'>
* use Array.Empty() where instead of allocating new zero-length arrays

* structure for loops in a way that the JIT will elide array/Span bounds checking

* avoiding function calls in for loop condition tests

* avoid LINQ in a hot path

* conform with code style

* fix mistake in GetNextWaitingObject()

* fix GetNextWaitingObject() possibility of returning null if all list items have TimePoint == long.MaxValue

* make GetNextWaitingObject() behave FIFO behavior for multiple items with the same TimePoint</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* use Array.Empty() where instead of allocating new zero-length arrays

* structure for loops in a way that the JIT will elide array/Span bounds checking

* avoiding function calls in for loop condition tests

* avoid LINQ in a hot path

* conform with code style

* fix mistake in GetNextWaitingObject()

* fix GetNextWaitingObject() possibility of returning null if all list items have TimePoint == long.MaxValue

* make GetNextWaitingObject() behave FIFO behavior for multiple items with the same TimePoint</pre>
</div>
</content>
</entry>
<entry>
<title>Minor code formatting (#4498)</title>
<updated>2023-03-04T13:43:08+00:00</updated>
<author>
<name>gdkchan</name>
<email>gab.dark.100@gmail.com</email>
</author>
<published>2023-03-04T13:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/commit/?id=4f3af839be4134ed63dbd705758714bd0fbba9ef'/>
<id>4f3af839be4134ed63dbd705758714bd0fbba9ef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement support for page sizes &gt; 4KB (#4252)</title>
<updated>2023-01-17T04:13:24+00:00</updated>
<author>
<name>gdkchan</name>
<email>gab.dark.100@gmail.com</email>
</author>
<published>2023-01-17T04:13:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/commit/?id=86fd0643c26433362a25acceb4fa1fcee07dd0b2'/>
<id>86fd0643c26433362a25acceb4fa1fcee07dd0b2</id>
<content type='text'>
* Implement support for page sizes &gt; 4KB

* Check and work around more alignment issues

* Was not meant to change this

* Use MemoryBlock.GetPageSize() value for signal handler code

* Do not take the path for private allocations if host supports 4KB pages

* Add Flags attribute on MemoryMapFlags

* Fix dirty region size with 16kb pages

Would accidentally report a size that was too high (generally 16k instead of 4k, uploading 4x as much data)

Co-authored-by: riperiperi &lt;rhy3756547@hotmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Implement support for page sizes &gt; 4KB

* Check and work around more alignment issues

* Was not meant to change this

* Use MemoryBlock.GetPageSize() value for signal handler code

* Do not take the path for private allocations if host supports 4KB pages

* Add Flags attribute on MemoryMapFlags

* Fix dirty region size with 16kb pages

Would accidentally report a size that was too high (generally 16k instead of 4k, uploading 4x as much data)

Co-authored-by: riperiperi &lt;rhy3756547@hotmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Implement missing service calls in `pm` (#4210)</title>
<updated>2023-01-15T21:16:24+00:00</updated>
<author>
<name>Isaac Marovitz</name>
<email>42140194+IsaacMarovitz@users.noreply.github.com</email>
</author>
<published>2023-01-15T21:16:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.benis.co.uk/Ryujinx/commit/?id=139a93040741ec78a4ee13035eab1b1b705bdcf8'/>
<id>139a93040741ec78a4ee13035eab1b1b705bdcf8</id>
<content type='text'>
* Implement `GetTitleId`

Fixes #2516

* Null check + Proper result code

* Better comment

* Implement `GetApplicationProcessId`

* Add TODOs

* Update Ryujinx.HLE/HOS/Services/Pm/IInformationInterface.cs

Co-authored-by: Ac_K &lt;Acoustik666@gmail.com&gt;

* Update Ryujinx.HLE/HOS/Services/Pm/IDebugMonitorInterface.cs

Co-authored-by: Ac_K &lt;Acoustik666@gmail.com&gt;

* Remove new function from KernelStatic

Co-authored-by: Ac_K &lt;Acoustik666@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Implement `GetTitleId`

Fixes #2516

* Null check + Proper result code

* Better comment

* Implement `GetApplicationProcessId`

* Add TODOs

* Update Ryujinx.HLE/HOS/Services/Pm/IInformationInterface.cs

Co-authored-by: Ac_K &lt;Acoustik666@gmail.com&gt;

* Update Ryujinx.HLE/HOS/Services/Pm/IDebugMonitorInterface.cs

Co-authored-by: Ac_K &lt;Acoustik666@gmail.com&gt;

* Remove new function from KernelStatic

Co-authored-by: Ac_K &lt;Acoustik666@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
