* prepo: Update implementation for 10.x changes
On 10.x, Nintendo changed yet another time the prepo SaveReport &
SaveReportWithUser command ids.
This PR add support for command 10104 & 10105 and update naming of the
old variants to match switchbrew.
* Fix misalign and remove a ToString
* Address jD's comment
* Fix compilation warnings and use new LibHac APIs for executable loading
* Migrate NSO loader to the new reader and fix kip loader
* Fix CS0162 restore
* Remove extra return lines
* Address Moose's comment
* Initial rebased AddOnContent support
* Fix bounds calculation
* Use existing GameCard in VFS per Xpl0itR's suggestion
+ Add dummy IPurchaseEventManager per AcK's suggestion
* Support multiple containers
* Add option to selectively disable addons
* Import tickets from AOC FS
* Load all nsps in base directory automatically
* Revert LoadNsp renaming
Removes conflicts with Mods PR. Not much is lost, old names were fine.
* Address AcK's comments
* Address Thog's comments
Dispose opened nsp files
Fix potential bug by clearing metadata on load
* Delete DelegateTypes.cs
* Delete DelegateCache.cs
* Add files via upload
* Update Horizon.cs
* Update Program.cs
* Update MainWindow.cs
* Update Aot.cs
* Update RelocEntry.cs
* Update Translator.cs
* Update MemoryManager.cs
* Update InstEmitMemoryHelper.cs
* Update Delegates.cs
* Nit.
* Nit.
* Nit.
* 10 fewer MSIL bytes for us
* Add comment. Nits.
* Update Translator.cs
* Update Aot.cs
* Nits.
* Opt..
* Opt..
* Opt..
* Opt..
* Allow to change compression level.
* Update MemoryManager.cs
* Update Translator.cs
* Manage corner cases during the save phase. Nits.
* Update Aot.cs
* Translator response tweak for Aot disabled. Nit.
* Nit.
* Nits.
* Create DelegateHelpers.cs
* Update Delegates.cs
* Nit.
* Nit.
* Nits.
* Fix due to #784.
* Fixes due to #757 & #841.
* Fix due to #846.
* Fix due to #847.
* Use MethodInfo for managed method calls.
Use IR methods instead of managed methods about Max/Min (S/U).
Follow-ups & Nits.
* Add missing exception messages.
Reintroduce slow path for Fmov_Vi.
Implement slow path for Fmov_Si.
* Switch to the new folder structure.
Nits.
* Impl. index-based relocation information. Impl. cache file version field.
* Nit.
* Address gdkchan comments.
Mainly:
- fixed cache file corruption issue on exit; - exposed a way to disable AOT on the GUI.
* Address AcK77 comment.
* Address Thealexbarney, jduncanator & emmauss comments.
Header magic, CpuId (FI) & Aot -> Ptc.
* Adaptation to the new application reloading system.
Improvements to the call system of managed methods.
Follow-ups.
Nits.
* Get the same boot times as on master when PTC is disabled.
* Profiled Aot.
* A32 support (#897).
* #975 support (1 of 2).
* #975 support (2 of 2).
* Rebase fix & nits.
* Some fixes and nits (still one bug left).
* One fix & nits.
* Tests fix (by gdk) & nits.
* Support translations not only in high quality and rejit.
Nits.
* Added possibility to skip translations and continue execution, using `ESC` key.
* Update SettingsWindow.cs
* Update GLRenderer.cs
* Update Ptc.cs
* Disabled Profiled PTC by default as requested in the past by gdk.
* Fix rejit bug. Increased number of parallel translations. Add stack unwinding stuffs support (1 of 2).
Nits.
* Add stack unwinding stuffs support (2 of 2). Tuned number of parallel translations.
* Restored the ability to assemble jumps with 8-bit offset when Profiled PTC is disabled or during profiling.
Modifications due to rebase.
Nits.
* Limited profiling of the functions to be translated to the addresses belonging to the range of static objects only.
* Nits.
* Nits.
* Update Delegates.cs
* Nit.
* Update InstEmitSimdArithmetic.cs
* Address riperiperi comments.
* Fixed the issue of unjustifiably longer boot times at the second boot than at the first boot, measured at the same time or reference point and with the same number of translated functions.
* Implemented a simple redundant load/save mechanism.
Halved the value of Decoder.MaxInstsPerFunction more appropriate for the current performance of the Translator.
Replaced by Logger.PrintError to Logger.PrintDebug in TexturePool.cs about the supposed invalid texture format to avoid the spawn of the log.
Nits.
* Nit.
Improved Logger.PrintError in TexturePool.cs to avoid log spawn.
Added missing code for FZ handling (in output) for fp max/min instructions (slow paths).
* Add configuration migration for PTC
Co-authored-by: Thog <me@thog.eu>
* Stubbed ImportServerPki
* thought it might be nice to name this variable properly
* i really need to name variables better
* Change Var
Co-authored-by: Thog <thog@protonmail.com>
* Change .ReadBytes(5) to IPC send buffer
Co-authored-by: Thog <thog@protonmail.com>
* Add description comment
Co-authored-by: Thog <thog@protonmail.com>
* fix build issue
* Resolve final suggestion
Co-authored-by: Thog <thog@protonmail.com>
* uhh
* it should work now shut up
* aligned variables just look so much nicer :)
* better variable alignment
* aligned
Co-authored-by: Thog <thog@protonmail.com>
* SurfaceFlinger: fix some bugs
This fixes some bugs in the current implementation and make it closer to
the real implementation.
* Fix align of some variables
* am: Implemnet common web applets
This implement parsing of input and output of web applets while making
those close directly.
TODO for the future: Use and hook a web browser.
* Address Ac_K's comments
* pctl: refactoring IParentalControlServiceFactory and IParentalControlService call
Our previous implementation was totally guessed. Now it's implemented according to RE, even if it's stubbed because we will not support Parental Control for now.
* unknownFlag > permissionFlag
* nvdrv: Partially implementation of GetStatus
This implement GetStatus call according to RE.
Since we don't handle tranfert memory on the initialize of the service, it's fine sets fields at 0 for now.
Tested on Undertale.
Fix#635
* Fix struct
The error code was taken from Switchbrew (https://switchbrew.org/wiki/Error_codes)
Even if TimeServiceNotInitialized's "description" is 0, the result "value" of "(0 << ErrorCodeShift) | ModuleId" is 0x74 so it is not the same as "Success" (0)
* am: Implement GetFriendInvitationStorageChannelEvent
This implement GetFriendInvitationStorageChannelEvent according to RE, needed by Streets of Rage 4
* Fix handle name
* add GetNotificationStorageChannelEvent
* Add two error codes to Mii
The two errors added are InvalidDatabaseSignatureValue and InvalidDatabaseEntryCount, which were taken from Switchbrew (https://switchbrew.org/wiki/Error_codes)
* Fix typo
* Remove unnecessary empty line
* Add various result codes to Loader
The error codes were taken from Switchbrew (switchbrew.org/wiki/Error_codes)
For the last 9 errors, Switchbrew says: ACID/ACI0 don't match for descriptor (descriptor)
* Fix typo
* Implement a new physical memory manager and replace DeviceMemory
* Proper generic constraints
* Fix debug build
* Add memory tests
* New CPU memory manager and general code cleanup
* Remove host memory management from CPU project, use Ryujinx.Memory instead
* Fix tests
* Document exceptions on MemoryBlock
* Fix leak on unix memory allocation
* Proper disposal of some objects on tests
* Fix JitCache not being set as initialized
* GetRef without checks for 8-bits and 16-bits CAS
* Add MemoryBlock destructor
* Throw in separate method to improve codegen
* Address PR feedback
* QueryModified improvements
* Fix memory write tracking not marking all pages as modified in some cases
* Simplify MarkRegionAsModified
* Remove XML doc for ghost param
* Add back optimization to avoid useless buffer updates
* Add Ryujinx.Cpu project, move MemoryManager there and remove MemoryBlockWrapper
* Some nits
* Do not perform address translation when size is 0
* Address PR feedback and format NativeInterface class
* Remove ghost parameter description
* Update Ryujinx.Cpu to .NET Core 3.1
* Address PR feedback
* Fix build
* Return a well defined value for GetPhysicalAddress with invalid VA, and do not return unmapped ranges as modified
* Typo
* Add various error codes to BCAT
The error codes were taken from Switchbrew (switchbrew.org/wiki/Error_codes)
As for InternetRequestDenied, it seems that this error is common for multiple services like Account for example
I already added this error code in Account in PR #1182
* Add some results codes from Libhac and keep names consistent
* nvservice: add a lock to NvHostEvent
* Disable surface flinger release fence and readd infinite timeout
* FenceAction: Add a timeout of 1 seconds as this shouldn't wait forever anyuway
* surfaceflinger: remove leftovers from the release fence
* Don't allow infinite timeout on syncpoint while printing all timeout for better debugging
InternetRequestDenied (I can't find a better name) was taken from Switchbrew (switchbrew.org/wiki/Error_codes)
Regarding this error, SwitchBrew notes: "IsAnyInternetRequestAccepted with the output from GetClientId returned false."
* nvservices: mitigate abort with heavy load on the GPU processing thread.
This should fix Mario Tennis and LM3 regressions with syncpoints.
NOTE: Mario Tennis seems to have another issue related to the texture
cache that happens randomly when starting a match.
PS: Also add a debug logger for all known ioctl call to facilitate
debugging and add a missing UpdateMin in EventSignal.
* Address LDj3SNuD's comment
* Address gdkchan's comment
This remove Utf8son and JsonPrettyPrinter dependencies.
NOTE: the standard JSON parser doesn't support configurable
indentation, as a result, all the pretty printed JSON are indented with 2
spaces.
This implement the rendering information output informations of
RequestUpdate.
This is needed by some games to keep track of the count of update on the
DSP.
* Add support for dynamic docking/undocking
As SurfaceFlinger is now working more accurately, we can now support
dynamic configuration of docking mode :)
* Simplify a bt the code
* Fix import ordering
* Remove unused argument
This invalidate the GraphicBuffer on the consumer side when
SetPreallocatedBuffer is called on a buffer slot.
This fix rendering issues on games with a dynamic resolution like Yoshi
Crafted World.
* Rewrite SurfaceFlinger
Reimplement accurately SurfaceFlinger (based on my 8.1.0 reversing of it)
TODO: support swap interval properly and reintroduce disabled "game vsync" support.
* Some fixes for SetBufferCount
* uncomment a test from last commit
* SurfaceFlinger: don't free the graphic buffer in SetBufferCount
* SurfaceFlinger: Implement swap interval correctly
* SurfaceFlinger: Reintegrate Game VSync toggle
* SurfaceFlinger: do not push a fence on buffer release on the consumer side
* Revert "SurfaceFlinger: do not push a fence on buffer release on the consumer side"
This reverts commit 586b52b0bfab2d11f361f4b59ab7b7141020bbad.
* Make the game vsync toggle work dynamically again
* Unregister producer's Binder object when closing layer
* Address ripinperi's comments
* Add a timeout on syncpoint wait operation
Syncpoint aren't supposed to be waited on for more than a second.
This effectively workaround issues caused by not having a channel
scheduling in place yet.
PS: Also introduce Android WaitForever warning about fence being not
signaled for 3s
* Fix a print of previous commit
* Address Ac_K's comments
* Address gdkchan's comments
* Address final comments