We should report errors even when not requested.
This also ensure we only clear the bits that were requested on the output.
Finally, this fix when input events is 0.
* Bsd: Fix NullReferenceException in BsdSockAddr.FromIPEndPoint()
Allows "Victor Vran Overkill Edition" to boot with guest internet access enabled.
Thanks to EmulationFanatic for testing this for me!
* Bsd: Return proper error code if RemoteEndPoint is null
* Remove whitespace from empty line
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Implement intrusive red-black tree, use it for HLE kernel block manager
* Implement TreeDictionary using IntrusiveRedBlackTree
* Implement IntervalTree using IntrusiveRedBlackTree
* Implement IntervalTree (on Ryujinx.Memory) using IntrusiveRedBlackTree
* Make PredecessorOf and SuccessorOf internal, expose Predecessor and Successor properties on the node itself
* Allocation free tree node lookup
This is a very old oversight on our Poll implementation.
This worked so far reliably because games and homebrews pass the same
buffer as input and output.
This PR some calls in `am` service:
- ISelfController: SetWirelessPriorityMode, SaveCurrentScreenshot (Partially checked by RE).
- ICommonStateGetter: GetHdcpAuthenticationState
Close#1831 and close#3527
This PR stub ResolverSetOptionRequest (checked by RE), but the options parsing is still missing since we don't support it in our current code.
(Close#3479)
* Avalonia: Another Cleanup
This PR is a cleanup to the avalonia code recently added:
- Some XAML file are autoformatted like a previous PR.
- Dlc is renamed to DownloadableContent (Locale exclude).
- DownloadableContentManagerWindow is a bit improved (Fixes#3491).
- Some nits here and there.
* Fix GTK
* Remove AttachDebugDevTools
* Fix last warning
* Fix JSON fields
Some games and the Mario Odyssey Multiplayer mod do this.
The SMO multiplayer mod also needs you to revert #3394 as it uses a blocking socket to receive (otherwise it hangs), and it doesn't seem to like being forced as non-blocking.
Because of that PR, TimeZoneRule was bigger than 0x4000 thanks to a
misuse of a constant.
This commit address this issue and add a new unit test to ensure the size of
TimeZoneRule is 0x4000 bytes.
Also address suggestions that were lost on the original PR.
* time: Make TimeZoneRule blittable and avoid copies
This drastically reduce overhead of using TimeZoneRule around the
codebase.
Effect on games is unknown
* Add missing Box type
* Ensure we clean the structure still
This doesn't perform any copies
* Address gdkchan's comments
* Simplify Box
* Rewrite kernel memory allocator
* Remove unused using
* Adjust private static field naming
* Change UlongBitSize to UInt64BitSize
* Fix unused argument, change argument order to be inline with official code and disable random allocation
The syncpoint maximum value represents the maximum possible syncpt value at a given time, however due to PBs being submitted before max was incremented, for a brief moment of time this is not the case which could lead to invalid behaviour if a game waits on the fence at that specific time.
* Implement syscall handlers using a source generator
* Copy FlushProcessDataCache implementation to Syscall since it was only implemented on Syscall32
* Fix wrong argument order in some syscalls
* Delete old Reflection.Emit based syscall handling code
* Improvements to the code generation
* ControlCodeMemory address and size is always 64-bit
* Refactor CPU interface
* Use IExecutionContext interface on SVC handler, change how CPU interrupts invokes the handlers
* Make CpuEngine take a ITickSource rather than returning one
The previous implementation had the scenario where the CPU engine had to implement the tick source in mind, like for example, when we have a hypervisor and the game can read CNTPCT on the host directly. However given that we need to do conversion due to different frequencies anyway, it's not worth it. It's better to just let the user pass the tick source and redirect any reads to CNTPCT to the user tick source
* XML docs for the public interfaces
* PPTC invalidation due to NativeInterface function name changes
* Fix build of the CPU tests
* PR feedback
* Enable JIT service LLE
* Force disable PPTC when using the JIT service
PPTC does not support multiple guest processes
* Fix build
* Make SM service registration per emulation context rather than global
* Address PR feedback
* Fix shared memory leak on Windows
* Fix memory leak caused by RO session disposal not decrementing the memory manager ref count
* Fix UnmapViewInternal deadlock
* Was not supposed to add those back
* Back to the origins: Make memory manager take guest PA rather than host address once again
* Direct mapping with alias support on Windows
* Fixes and remove more of the emulated shared memory
* Linux support
* Make shared and transfer memory not depend on SharedMemoryStorage
* More efficient view mapping on Windows (no more restricted to 4KB pages at a time)
* Handle potential access violations caused by partial unmap
* Implement host mapping using shared memory on Linux
* Add new GetPhysicalAddressChecked method, used to ensure the virtual address is mapped before address translation
Also align GetRef behaviour with software memory manager
* We don't need a mirrorable memory block for software memory manager mode
* Disable memory aliasing tests while we don't have shared memory support on Mac
* Shared memory & SIGBUS handler for macOS
* Fix typo + nits + re-enable memory tests
* Set MAP_JIT_DARWIN on x86 Mac too
* Add back the address space mirror
* Only set MAP_JIT_DARWIN if we are mapping as executable
* Disable aliasing tests again (still fails on Mac)
* Fix UnmapView4KB (by not casting size to int)
* Use ref counting on memory blocks to delay closing the shared memory handle until all blocks using it are disposed
* Address PR feedback
* Make RO hold a reference to the guest process memory manager to avoid early disposal
Co-authored-by: nastys <nastys@users.noreply.github.com>
* hle: Some cleanup
This PR cleaned up a bit the HLE folder and the VirtualFileSystem one, since we use LibHac, we can use some class of it directly instead of duplicate things. The "Content" of VFS folder is removed since it should be handled in the NCM service directly.
A larger cleanup should be done later since there is still be duplicated code here and there.
* Fix Headless.SDL2
* Addresses gdkchan feedback
* De-tile GOB when DMA copying from block linear to pitch kind memory regions
* XML docs + nits
* Remove using
* No flush for regular buffer copies
* Add back ulong casts, fix regression due to oversight
* oslc: Fix condition in GetSaveDataBackupSetting
This PR fixes a condition previously implemented in #3190 where ACNH can't be booted without an existing savedata.
Closes#3206
* Addresses gdkchan feedback