aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS
AgeCommit message (Collapse)Author
2020-03-26Make Device Location Name configuration (custom TZ) (#1031)Thog
This permit to use arbitrary timezone (instead of UTC). Useful for games like ACNH.
2020-03-26prepo: Add a MessagePack object formatter (#1034)jduncanator
2020-03-25prepo: Implement RequestImmediateTransmission and GetTransmissionStatus (#1033)Ac_K
* prepo: Implement RequestImmediateTransmission and GetTransmissionStatus This implement RequestImmediateTransmission and GetTransmissionStatus of the prepo service accurately to RE. Since we don't use reports, I've explained what the calls do in the real service. Close #958 * fix comment
2020-03-25Add IMultiCommitManager (#1011)Alex Barney
* Update LibHac * Add IMultiCommitManager * Updates * Delete NuGet.Config * Add command version
2020-03-24prepo: Resolve JSON parsing issues in prepo report handling (#1022)jduncanator
It seems MsgPack.Cli incorrectly converts some unicode control characters directly to JSON literal Unicode strings (eg. '\1'). As these are invalid, pretty printing the JSON report fails. This removes pretty printing, pending a proper implementation, and tidies up MsgPack deserialization.
2020-03-23friends: Stub GetBlockedUserListIds (#1017)Thog
2020-03-23Fix Prepo parsing reports (#1016)Ac_K
This fix the parsing of prepo service reports which could failed in some edge case. I've improved the parsing of the object to a JSON string too.
2020-03-20Implement GetRegionCode and add the RegionCode to settings (#999)Ac_K
This implement `GetRegionCode` accordingly to RE. I've added a setting in the GUI and a field in the Configuration file with a way to update the Configuration file if needed.
2020-03-18audren: Accept REV8 (#993)Thog
REV8 only added changes on performance buffer and wavebuffer dsp command generation. As we don't support any of those, we can just increment the revision number for now.
2020-03-12Use a Jump Table for direct and indirect calls/jumps, removing transitions ↵riperiperi
to managed (#975) * Implement Jump Table for Native Calls NOTE: this slows down rejit considerably! Not recommended to be used without codegen optimisation or AOT. - Does not work on Linux - A32 needs an additional commit. * A32 Support (WIP) * Actually write Direct Call pointers to the table That would help. * Direct Calls: Rather than returning to the translator, attempt to keep within the native stack frame. A return to the translator can still happen, but only by exceptionally bubbling up to it. Also: - Always translate lowCq as a function. Faster interop with the direct jumps, and this will be useful in future if we want to do speculative translation. - Tail Call Detection: after the decoding stage, detect if we do a tail call, and avoid translating into it. Detected if a jump is made to an address outwith the contiguous sequence of blocks surrounding the entry point. The goal is to reduce code touched by jit and rejit. * A32 Support * Use smaller max function size for lowCq, fix exceptional returns When a return has an unexpected value and there is no code block following this one, we now return the value rather than continuing. * CompareAndSwap (buggy) * Ensure CompareAndSwap does not get optimized away. * Use CompareAndSwap to make the dynamic table thread safe. * Tail call for linux, throw on too many arguments. * Combine CompareAndSwap 128 and 32/64. They emit different IR instructions since their PreAllocator behaviour is different, but now they just have one function on EmitterContext. * Fix issues separating from optimisations. * Use a stub to find and execute missing functions. This allows us to skip doing many runtime comparisons and branches, and reduces the amount of code we need to emit significantly. For the indirect call table, this stub also does the work of moving in the highCq address to the table when one is found. * Make Jump Tables and Jit Cache dynmically resize Reserve virtual memory, commit as needed. * Move TailCallRemover to its own class. * Multithreaded Translation (based on heuristic) A poor one, at that. Need to get core count for a better one, which means a lot of OS specific garbage. * Better priority management for background threads. * Bound core limit a bit more Past a certain point the load is not paralellizable and starts stealing from the main thread. Likely due to GC, memory, heap allocation thread contention. Reduce by one core til optimisations come to improve the situation. * Fix memory management on linux. * Temporary solution to some sync problems. This will make sure threads exit correctly, most of the time. There is a potential race where setting the sync counter to 0 does nothing (counter stays at what it was before, thread could take too long to exit), but we need to find a better way to do this anyways. Synchronization frequency has been tightened as we never enter blockwise segments of code. Essentially this means, check every x functions or loop iterations, before lowcq blocks existed and were worth just as much. Ideally it should be done in a better way, since functions can be anywhere from 1 to 5000 instructions. (maybe based on host timer, or an interrupt flag from a scheduler thread) * Address feedback minus CompareAndSwap change. * Use default ReservedRegion granularity. * Merge CompareAndSwap with its V128 variant. * We already got the source, no need to do it again. * Make sure all background translation threads exit. * Fix CompareAndSwap128 Detection criteria was a bit scuffed. * Address Comments.
2020-03-04Implement some calls of ISelfController (#965)Ac_K
* Implement some calls of ISelfController This PR implement some calls of ISelfController: - EnterFatalSection - LeaveFatalSection - GetAccumulatedSuspendedTickValue (close #937) According to RE of the 8.1.0 am service. * thread safe increment/decrement * Fix thread safe * remove unused using
2020-03-03Add support for cache storage (#936)Alex Barney
* Update LibHac * Run EnsureApplicationCacheStorage when launching a game * Add new FS commands
2020-03-03stub GetNintendoAccountUserResourceCacheForApplication (#962)Thog
2020-03-02Implement mii:u and mii:e entirely (#955)Thog
* Implement mii:u and mii:e entirely Co-authored-by: AcK77 <Acoustik666@gmail.com> This commit implement the mii service accurately. This is based on Ac_k work but was polished and updated to 7.x. Please note that the following calls are partially implemented: - Convert: Used to convert from old console format (Wii/Wii U/3ds) - Import and Export: this is shouldn't be accesible in production mode. * Remove some debug leftovers * Make it possible to load an arbitrary mii database from a Switch * Address gdk's comments * Reduce visibility of all the Mii code * Address Ac_K's comments * Remove the StructLayout of DatabaseSessionMetadata * Add a missing line return in DatabaseSessionMetadata * Misc fixes and style changes * Fix some issues from last commit * Fix database server metadata UpdateCounter in MarkDirty (Thanks Moose for the catch) * MountCounter should only be incremented when no error is reported * Fix FixDatabase Co-authored-by: Alex Barney <thealexbarney@gmail.com>
2020-02-18Actually use the dummy NACP for EnsureApplicationSaveData (#939)Alex Barney
2020-02-17Implement GetCurrentIpConfigInfo (#943)Thog
* Implement GetCurrentIpConfigInfo This is needed by Rocket League. Also fix GetCurrentIpConfigInfo to not return ipv6 addresses * Address Ac_K comment
2020-02-12Stub the application copyright framebuffer api (#921)Thog
* Stub the application copyright framebuffer api As we currently don't support multi layers on vi/nvnflinger, this PR implement a stub of this API. * Address Cyuubi's comments * Add IPC checks and comments for future reversing Co-authored-by: Ac_K <Acoustik666@gmail.com> Co-authored-by: Ac_K <Acoustik666@gmail.com>
2020-02-06Fix a crash when closing the main UI (#904)Thog
* Fix a crash when closing the main Ui Also make sure to dispose the OpenAL context to not leak memory when unloading the emulation context. * Improve keys and 'game already running' dialogs * Make sure to dispose the page table and ThreadContext Less memory leaks! * Fix tests * Address gdk's comments
2020-02-06Render Profiler in GUI (#854)emmauss
* move profiler output to gui * addressed commits, rebased * removed whitespaces
2020-02-06Implement IDeliveryCacheProgressService in bcat (#908)Thog
* Implement IDeliveryCacheProgressService in bcat This stub IDeliveryCacheProgressService IPC interface as we don't plan to support cache delivery. * Address jd's comments * Address jd's comment correctly * Address gdk's comments
2020-02-02Fix inconsistencies with UserId (#906)Thog
* Fix inconsistencies with UserId The account user id isn't an UUID. This PR adds a new UserId type with the correct value ordering to avoid mismatch with LibHac's Uid. This also fix an hardcoded value of the UserId. As the userid has been invalid for quite some time (and to avoid forcing users to their recreate saves), the userid has been changed to "00000000000000010000000000000000". Also implement a stub for IApplicationFunctions::GetSaveDataSize. (see the sources for the reason) Fix #626 * Address jd's & Ac_k's comments
2020-01-31Fix application list (#891)Xpl0itR
* Fix application list * Convert file extensions to lowercase before comparing * AcK's requested changes * fixed bug found by gdkchan's requested changes * Account for mismatch between LibHac.TitleLanguage and ...System.Language
2020-01-30Discard higher 32-bits of IPC message magic and command number (#911)gdkchan
2020-01-30prepo IPrepoService accurate parsing for report (#905)Ac_K
* prepo IPrepoService accurate parsing for report I've found they use msgpack for the report, so I've added a nuget package and deserialize the report in the right way. Close #838 * jD requested changes * Change nuget to MsgPack.Cli * Use var instead of explicit cast
2020-01-27Fix OpenBisFileSystem wrong buffer type (#909)Thog
As the title say.
2020-01-26SoftwareKeyboard: Interactive data size should include size field. (#907)bunnei
2020-01-21Keep the GUI alive when closing a game (#888)Thog
* Keep the GUI alive when closing a game Make HLE.Switch init when starting a game and dispose it when closing the GlScreen. This also make HLE in charge of disposing the audio and gpu backend. * Address Ac_k's comments * Make sure to dispose the Discord module and use GTK quit method Also update Discord Precense when closing a game. * Make sure to dispose MainWindow * Address gdk's comments
2020-01-19Update 32 bits syscalls to match 64 bits implementation (#892)Thog
* Implement 32 bits syscalls Co-authored-by: riperiperi <rhy3756547@hotmail.com> Implement all 32 bits counterparts of the 64 bits syscalls we currently have. * Add FlushProcessDataCache32 * Address jd's comments
2020-01-18Various small audren fixes (#894)bylaws
* Remove redundant modulo on wave buffer index This is already performed by SetBufferIndex * Correct typo in UpdateDataHeader MixeSize -> MixSize * Remove unused variable in audren 'volume' was unused and 'voice.Volume' was used instead so remove 'volume'
2020-01-17Support audio effect output status (#890)gdkchan
* Support audio effect output status * Remove extra line
2020-01-16Update to LibHac 0.8.2 (#889)Alex Barney
* Update to LibHac 0.8.2 This brings support for temporary savedata, ignores case in key names when loading from a file, and prints the rights ID correctly when missing a title key. * Auto-format IFileSystemProxy
2020-01-13Rework SVC handling (#883)Thog
* Rework SVC handling Prepare for 32 bits support. * QueryMemory64 x1 is an output * Pregenerate all SVC handler Also clean up + 32 bits code path * Address gdk's comments * Simplify local setter loop * Address jd's comments
2020-01-13Name all threads (#886)Ac_K
* Name all threads Close #874 * use ThreadName instead of ThreadId in Logging
2020-01-12Call EnsureApplicationSaveData when launching a game (#871)Alex Barney
* Workaround for the lack of a program registry * Call EnsureApplicationSaveData when launching a game
2020-01-12Add 32 bits support to HleProcessDebugger (#859)Thog
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
2020-01-12MapBufferEx: take page size into account (#873)Thog
Fix #744
2020-01-12System firmware installer (#791)emmauss
* firmware installer * Add directory installation option and fix 9.x support for directory * Fix missing system font error while installing for the first time * Address code style comments * Create and use InvalidFirmwarePackageException * Fix LDj3SNuD's comments * addressed alex's comments * add label to status bar to show current firmware version Co-authored-by: Thog <thog@protonmail.com>
2020-01-09Fix R5G6B5 in SurfaceFlinger (#863)Thog
Also fix B5G6R5Unorm wrong definition in Ryujinx.Graphics.OpenGL.
2020-01-09Address PR feedbackgdkchan
Removes a useless null check Aligns some values to improve readability
2020-01-09Address PR feedbackgdkchan
Add TODO comment for GL_EXT_polygon_offset_clamp
2020-01-09Initialize GPU physical memory accessor from KProcess, to allow homebrew ↵gdkchan
that never maps anything on the GPU to work
2020-01-09Improved and simplified window texture presentationgdk
2020-01-09Add per-source type memory change tracking, simplified state change ↵gdk
tracking, other fixes
2020-01-09Initial workgdk
2020-01-09Fix timezone month being reported incorrectly to games (#861)Thog
Nintendo actually uses range from 1 to 12 for months (when original timezone code manage 0-11)
2020-01-05Rename "RyuFs" directory to "Ryujinx" and use the same savedata system the ↵Alex Barney
Switch uses (#801) * Use savedata FS commands from LibHac * Add EnsureSaveData. Use ApplicationControlProperty struct * Add a function to migrate to the new directory layout * LibHac update * Change backup structure * Don't create UI files in the save path * Update RyuFs paths * Add GetProgramIndexForAccessLog Ryujinx only runs one program at a time, so always return values reflecting that * Load control NCA when loading from an NSP * Skip over UI stats when exiting * Set TitleName and TitleId in more cases. Fix TitleID naming style * Completely comment out GUI play stats code * rebase * Update LibHac * Update LibHac * Revert UI changes * Do migration automatically at startup * Rename RyuFs directory to Ryujinx * Update RyuFs text * Store savedata paths in the GUI * Make "Open Save Directory" work * Use a dummy NACP in EnsureSaveData if one is not loaded * Remove manual migration button * Respond to feedback * Don't read the installer config to get a version string * Delete nuget.config * Exclude 'sdcard' and 'bis' during migration Co-authored-by: Thog <thog@protonmail.com>
2020-01-04Fix EphemeralNetworkSystemClock wrong steady clock (#858)Thog
oops
2019-12-29Fix GUI freeze wehn closing without any emulation running (#853)Thog
2019-12-26Fix LibHac.IStorage not being disposed in FileSystem proxy (#851)Thog
2019-12-26Make HLE disposable safely (#850)Thog
* Make HLE disposable safely This fix the oldest issue with the HLE code: the kernel side disposability. Changelog: - Implement KProcess::UnpauseAndTerminateAllThreadsExcept, KThread::Terminate, KThread::TerminateCurrentProcess, KThread::PrepareForTermiation and the svc post handler accurately. - Implement svcTerminateProcess and svcExitProcess. (both untested) - Fix KHandleTable::Destroy not decrementing refcount of all objects stored in the table. - Spawn a custom KProcess with the maximum priority to terminate every guest KProcess. (terminating kernel emulation safely) - General system stability improvements to enhance the user's experience. * Fix a typo in a comment in KProcess.cs * Address gdk's comments