Commit graph

1665 commits

Author SHA1 Message Date
Joshi234 a8c945f35f
Add items to standard logs (#1942)
* Added more items to log

* Update MainWindow.cs

* Added log when changing settings

* fix formating and add log when toggling vsync and docked

* Update Ryujinx/Ui/MainWindow.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Update Ryujinx/Ui/MainWindow.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Update Ryujinx/Ui/Windows/SettingsWindow.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Fix formating

* Change Location according to suggestion

* Implemented OpenDataStorageWithProgramIndex

* Update IFileSystemProxy.cs

* Update IFileSystemProxy.cs

* Commited that file on accidant

* Revert "Merge branch 'master' of https://github.com/Joshi234/Ryujinx"

This reverts commit 375f430455, reversing
changes made to 672e2c8f7d.

* Revert "Update IFileSystemProxy.cs"

This reverts commit 672e2c8f7d.

* Update IFileSystemProxy.cs

* Update ISystemSettingsServer.cs

* removed accidantel addition of IFileSystemProxy.OpenDataStorageWithProgramIndex

* Fix formating and add missing stub

* Update ISystemSettingsServer.cs

* Added more items to log

* Update MainWindow.cs

* Added log when changing settings

* fix formating and add log when toggling vsync and docked

* Fix formating

* Update Ryujinx/Ui/MainWindow.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Update Ryujinx/Ui/MainWindow.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Update Ryujinx/Ui/Windows/SettingsWindow.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Change Location according to suggestion

* Fix Rebase stuff

* Change Logger.Notice to Loger.Info

* Update ISystemSettingsServer.cs

* Update ISystemSettingsServer.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>
2021-03-19 00:09:33 +01:00
Ac_K db56b2166d
ErrorApplet: Implement ApplicationErrorArg (#2123)
This PR implement `ApplicationErrorArg` to the Error Applet. It's used by the guest to throw some specific error messages.
The code was done for (and merged) LDN2 build since long time ago and have been tested a bunch of times because of that! In a way to reduce the differences between LDN and master build it's fine to add it to master.
2021-03-19 00:04:49 +01:00
VocalFan ca848d6359
Minor wording fixes... Except I'm doing it for all of Ryujinx. (#2078)
* Minor wording fixes

* Exit dialogue.

* Update MainWindow.cs

* Update DlcWindow.cs

* I found an actual typo for once.

* There we go.

* Fix

* Update MainWindow.cs

* MainWindow is done

* Update ControllerWindow.cs
2021-03-18 23:44:39 +01:00
Ac_K a56423802c
nfp: Amiibo scanning support (#2006)
* Initial Impl.

* You just want me cause I'm next

* Fix some logics

* Fix close button
2021-03-18 21:40:20 +01:00
EmulationFanatic 2b92c10105
Fix typos (#2109) 2021-03-17 00:11:50 +01:00
mageven e44850fed4
Implement friendlier portable mode (#1885)
* Implement friendlier portable mode

* Remove first run dialog

* Disable updates in portable mode for now

* Convert relative custom paths to absolute ones

Also, fix a regression when custom path doesn't exist
2021-03-15 22:10:36 +01:00
Mary 88d0708061
Fix typo in assert in OpenAL implementation detail (#2106)
That one missing patch oops.
2021-03-14 23:48:35 +01:00
riperiperi 12b953dd57
Report active audio device as TV, rather than internal speakers. (#2103) 2021-03-14 21:31:36 +11:00
Mary 39f171ece5
Override openal-soft configuration (#2101)
This enforce speaker mode to avoid weird audio quality reduction with
output considered as headphones by Windows (It applies a HRTF or crossfeed filter supposed to improve audio quality, might be a bug on their end)
2021-03-13 21:20:02 +11:00
Ac_K 548add9abd
Test: Fixes github action warning (#2100)
This PR fixes a GitHub Action warning, nothing more.
2021-03-13 04:12:36 +01:00
gdkchan 5ab5b0e709
Close ILibraryAppletAccessor handles on disposal (#2094) 2021-03-10 21:36:38 +01:00
riperiperi dbce3455ad
Fix lineSize for LinearStrided -> Linear conversion (#2091)
Fixes a possible crash when width is greater than stride, which can happen due to alignment when copying textures.
2021-03-10 01:24:46 +01:00
riperiperi ede26556f2
Traverse PhiNodes for Bindless Elimination (#2089)
This allows bindless handles to be found for image/texture instructions with predicates, when the assignment of the texture handle is within the same predicate.

This seems to cover the remaining bindless handles that compilers seem to be creating due to optimizations.

Will affect newer UE4 games, and games by NdCube (Super Mario Party, Clubhouse Games)
2021-03-09 17:27:44 -03:00
riperiperi 1623ab524f
Improve Buffer Textures and flush Image Stores (#2088)
* Improve Buffer Textures and flush Image Stores

Fixes a number of issues with buffer textures:

- Reworked Buffer Textures to create their buffers in the TextureManager, then bind them with the BufferManager later.
  - Fixes an issue where a buffer texture's buffer could be invalidated after it is bound, but before use.
- Fixed width unpacking for large buffer textures. The width is now 32-bit rather than 16.
- Force buffer textures to be rebound whenever any buffer is created, as using the handle id wasn't reliable, and the cost of binding isn't too high.

Fixes vertex explosions and flickering animations in UE4 games.

* Set ImageStore flag... for ImageStore.

* Check the offset and size.
2021-03-08 18:43:39 -03:00
riperiperi da283ff3c3
Flip component mask if target is BGRA. (#2087)
* Flip component mask if target is BGRA.

* Make mask selection less ugly.
2021-03-08 11:12:19 +11:00
riperiperi a539303e71
Remove unused physical region tracking (#2085)
* Remove unused physical region tracking

* Update comments
2021-03-06 20:21:53 -03:00
riperiperi 8d36681bf1
Improve handling for unmapped GPU resources (#2083)
* Improve handling for unmapped GPU resources

- Fixed a memory tracking bug that would set protection on empty PTEs
- When a texture's memory is (partially) unmapped, all pool references are forcibly removed and the texture must be rediscovered to draw with it. This will also force the texture discovery to always compare the texture's range for a match.
- RegionHandles now know if they are unmapped, and automatically unset their dirty flag when unmapped.
- Partial texture sync now loads only the region of texture that has been modified. Unmapped memory tracking handles cause dirty flags for a texture group handle to be ignored.

This greatly improves the emulator's stability for newer UE4 games.

* Address feedback, fix MultiRange slice

Fixed an issue where the size of the multi-range slice would be miscalculated.

* Update Ryujinx.Memory/Range/MultiRange.cs (feedback)

Co-authored-by: Mary <thog@protonmail.com>

Co-authored-by: Mary <thog@protonmail.com>
2021-03-06 11:43:55 -03:00
Billy Laws bab6eedccf
Fix SetStandardSteadyClockInternalOffset permission check (#2076)
I happened to notice this when checking Ryu's IPC structures. After double checking with RE it seems the current check is incorrect so use the correct member to fix that.
2021-03-04 11:58:21 +01:00
mageven ca5d8e58dd
Add progress reporting to PTC and Shader Cache (#2057)
* UI changes

* Add progress reporting to PTC & ShaderCache

* Account for null events and expand docs

Co-authored-by: Joshi234 <46032261+Joshi234@users.noreply.github.com>
2021-03-03 01:39:36 +01:00
Mary 31fca432a7
Amadeus: Add ARM SIMD fast path (#2069)
Add fast paths in the audio renderer for AArch64 in all current fast paths.
2021-03-02 23:50:46 +01:00
mageven 3d04d7ef08
Fix "Hide Cursor on Idle" inefficiency (#2058)
* Rewrite cursor hiding code to be efficient

* Formatting nits
2021-03-02 23:45:33 +01:00
riperiperi b530f0e110
Texture Cache: "Texture Groups" and "Texture Dependencies" (#2001)
* Initial implementation (3d tex mips broken)

This works rather well for most games, just need to fix 3d texture mips.

* Cleanup

* Address feedback

* Copy Dependencies and various other fixes

* Fix layer/level offset for copy from view<->view.

* Remove dirty flag from dependency

The dirty flag behaviour is not needed - DeferredCopy is all we need.

* Fix tracking mip slices.

* Propagate granularity (fix astral chain)

* Address Feedback pt 1

* Save slice sizes as part of SizeInfo

* Fix nits

* Fix disposing multiple dependencies causing a crash

This list is obviously modified when removing dependencies, so create a copy of it.
2021-03-02 19:30:54 -03:00
Caian Benedicto 7a90abc035
Fix regression in SignalMemoryTracking (#2073)
* Fix wrong VA being passed to VirtualMemoryEvent

* Remove unnecessary type in discard

Co-authored-by: gdkchan <gab.dark.100@gmail.com>

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2021-03-01 12:01:25 +01:00
mageven 06a2b03cc9
Revise SystemInfo (#2047)
* Revise SystemInfo

Cleans up and adds a bit more info (logical core count and available mem at launch) to logs.

- Extract CPU name from CPUID when supported.
- Linux: Robust parsing of procfs files
- Windows: Prefer native calls to WMI
- Remove unnecessary virtual specifiers

* Address gdkchan's comments

* Address AcK's comments

* Address formatting nits
2021-03-01 15:22:00 +11:00
Mary d02eeed9c1
Haydn: Make SoundIO session implementation lock-free (#2068)
* Haydn: Fix race condition in SoundIO Update implementation

This should fix weird crashes happening for some people with SoundIO.

Fix #2062

* haydn: Make SoundIO session lock-free
2021-02-28 17:20:34 +01:00
Mary 460a98390e
ci: Use Github artifacts for PRs (#2040)
* ci: Use Github artifacts for PRs

This PR extends the build job by upload artifacts for all PRs.
The version of those builds is set to "1.0.0-<git_short_hash>" and those
builds have the updater explicitly disabled.

With this in place, we will be able to disable ApppVeyor on PRs.

* Add actions to comment build links

As Github doesn't provide links to unlogged users, we use nightly.link for that.

* Address Ac_k's comments
2021-02-28 11:56:15 +01:00
Caian Benedicto f7b2daf5ec
Fix virtual address overflow near ulong limit (#2044)
* Fix virtual address overflow near ulong limit

* Fix comments

* Improve overflow checking for large size values

* Add overflow checking to AddressSpaceManager class

* Add overflow protection to read and write functions
2021-02-28 11:48:04 +01:00
VocalFan fd9d16c3b3
Some minor formal wording for the updater. (#2060)
* Some minor formal wording for the updater.

* Fixed a line.
2021-02-28 11:33:36 +01:00
Caian Benedicto 8b4e4fc076
Improve heuristic for showing the keyboard (#2066) 2021-02-28 11:26:00 +01:00
Mary f556c80d02
Haydn: Part 1 (#2007)
* Haydn: Part 1

Based on my reverse of audio 11.0.0.

As always, core implementation under LGPLv3 for the same reasons as for Amadeus.

This place the bases of a more flexible audio system while making audout & audin accurate.

This have the following improvements:
- Complete reimplementation of audout and audin.
- Audin currently only have a dummy backend.
- Dramatically reduce CPU usage by up to 50% in common cases (SoundIO and OpenAL).
- Audio Renderer now can output to 5.1 devices when supported.
- Audio Renderer init its backend on demand instead of keeping two up all the time.
- All backends implementation are now in their own project.
- Ryujinx.Audio.Renderer was renamed Ryujinx.Audio and was refactored because of this.

As a note, games having issues with OpenAL haven't improved and will not
because of OpenAL design (stopping when buffers finish playing causing
possible audio "pops" when buffers are very small).

* Update for latest hexkyz's edits on Switchbrew

* audren: Rollback channel configuration changes

* Address gdkchan's comments

* Fix typo in OpenAL backend driver

* Address last comments

* Fix a nit

* Address gdkchan's comments
2021-02-26 01:11:56 +01:00
pineappleEA 1c49089ff0
Fix updater breaking user execute permissions on Unix (#2055)
* Fix updater breaking user run permissions on *nix

The updater currently sets the permissions to user run only when the yes button is clicked, this changes it to run on Updater.cs after it's done updating as it should.

* Fix nits
2021-02-25 10:35:48 +11:00
mageven fa55d7133a
Pacify updater (#1899)
* Updater: Remove dirs selectively

* Log exceptions from updater async tasks

* Address riperiperi's comments
2021-02-23 16:19:02 +01:00
LDj3SNuD bcbf240d2e
PPTC: Fix unwanted propagation of a relocatable constant in a specific case. (#1990)
* Fix unwanted propagation of a relocatable constant in a specific case.

* Ptc.InternalVersion = 1990

* Nit to retrigger the Checks.
2021-02-23 13:15:45 +01:00
EmulationFanatic 0aea1e5cb0
Update README.MD (#2049) 2021-02-22 22:09:55 +01:00
sharmander 4e26aed816
UI: Multithreaded Updater (#2031)
* Use multiple threads to download different chunks of an update simultaneously. This reduces time to complete the download significantly.

* Remove dirty-flag check (for test purposes)

* Clean up updater code.

* Include fallback to single-threaded updater if mt fails

* Reduce connection count to 4.

* Improve fallback on error.
Correct issue where data was missing during download due to total build size not being cleanly divisble by the connection count.
Cleaned up unnecessary code.

* Add missing return statements

* Fix alignment

* Alignment

* More alignment

* Rely on content-range request instead of xml/json size property.

* Re-instate dirty checking and version checking to move into review stage.

* Address comments

* Address comments

* Comments

* Comments

* Final...?

* final final

* final final final nit

* Use Array.Copy as requested by rip

* Updated some names for clarity.

* Move addition into for loop (to shorten line width)

* Add missing semicolon -- forgot to stage :9
2021-02-22 21:48:45 +01:00
mageven 9bda7b4699
Implement VCNT instruction (#1963)
* Implement VCNT based on AArch64 CNT

Add tests

* Update PTC version

* Address LDj's comments

* Explicit size in encoding
* Tighter tests
* Replace SoftFallback with IR helper

Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>

* Reduce one BitwiseAnd from IR fallback

Based on popcount64b from https://en.wikipedia.org/wiki/Hamming_weight#Efficient_implementation

* Rename parameter and add assert

Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>

Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
2021-02-22 16:26:13 +01:00
LDj3SNuD dc0adb533d
PPTC & Pool Enhancements. (#1968)
* PPTC & Pool Enhancements.

* Avoid buffer allocations in CodeGenContext.GetCode(). Avoid stream allocations in PTC.PtcInfo.

Refactoring/nits.

* Use XXHash128, for Ptc.Load & Ptc.Save, x10 faster than Md5.

* Why not a nice Span.

* Added a simple PtcFormatter library for deserialization/serialization, which does not require reflection, in use at PtcJumpTable and PtcProfiler; improves maintainability and simplicity/readability of affected code.

* Nits.

* Revert #1987.

* Revert "Revert #1987."

This reverts commit 998be765cf.
2021-02-22 03:23:48 +01:00
FICTURE7 1586880114
Turn Copy into Fill in HybridAllocator (#2010)
* Turn Copy into Fill in HybridAllocator

* Set PTC internal verison
2021-02-21 18:33:59 +01:00
Ac_K 8cdb50d703
appletAE: Implement SetLcdBacklighOffEnabled (#2037)
This PR implement `appletAE ICommonStateGetter SetLcdBacklighOffEnabled` accordingly to RE.

Closes #2021
2021-02-21 09:21:32 +01:00
Jose Padilla ad7d22777f
Controller Input handling refactoring (#1751)
* This should fix issue #1374 in Linux

Changes:
- Bind buttons by detecting the transition from down to up.
- Bind axis by detecting movement from value higher than 50% to a value lower than 50%.

Caveats:
- I have tested only with DS3 in Linux (Fedora 32).
- ZL and ZR detection works by accident. This code doesn't take negative axis into account.
  The reason it works is because axis are managed in absolute value. So when pressing ZL/ZR
  axis value goes from -1 to 1 (or 1 to 0 and back to 1) and this hits the axis detector.
- Likely I have broken all the other controllers xD (testing needed).

* Assign keyboardPressed

* Make a more robust detection of pressed buttons when using a controller

* Add interface to bind buttons from Joystick and Keyboard

* Fix style issues after code review by @AcK77  (Thanks!)

* Move new classes to Ryujinx.Ui.Input namespace

* Use explicit types instead of var

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Mary <thog@protonmail.com>

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Mary <thog@protonmail.com>

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Mary <thog@protonmail.com>

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Add a new empty line before

* Up

Co-authored-by: Jose Padilla <jose@prensalink.com>
Co-authored-by: Mary <thog@protonmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
2021-02-21 00:22:55 +01:00
sharmander d5081e3f93
Make windows DPI aware to display properly on high-resolution screens. (#1983)
* Make Windows DPI aware to display properly on high-resolution screens.

* remove empty line

* Don't use app manifest, set process dpi aware programatically.

Store variables in Program.cs for use instead of re-creating them per class/ method.

* Fix for linux/osx

* Add braces

* Re-use manifest. It appears to be required on linux.

* Undo previous commit -- it appears linux was simply never affected.

* Addressed AcK's comments

* Remove unused usings

* Address comments by AcK #2

* Re-order

* Move FromHwnd call to ForceDpiAware class. Wrap in Try-Catch to prevent crashes on systems that don't support it.

* Additional code cleanup

* Remove "global::" reference.
2021-02-20 01:34:41 +01:00
mageven 65eb9901f1
Allow modding AddOnContent RomFS (#2024)
Simplify some misc logic
2021-02-20 01:25:01 +01:00
mageven d9b3f3fa3a
Allow reconfiguring "Ignore Missing Services" during emulation (#2034) 2021-02-19 20:31:57 +01:00
Ac_K b93fe5979a
nifm: Fix returned buffer size of GetClientId (#2036)
This PR fix an issue introduced on last IPC rewrite PRs where some returned buffer size have to be explicit now.
`GetClientId` without an explicit buffer size return some garbage to the guest and then `nifm` service crashes because of a wrong ClientId. It's fixed now.

Horizon Chase Turbo and Doom regression are fixed now.  (Probably some other games too)
2021-02-19 20:18:13 +01:00
Ac_K c6d3c4207a
settings: Fix returned buffer size of GetFirmwareVersion (#2029) 2021-02-17 21:10:53 +01:00
gdkchan 9d82d27df2
Fix memory tracking performance regression (#2026)
* Fix memory tracking performance regression

* Set PTC version
2021-02-17 09:16:20 +11:00
gdkchan 715b605e95
Validate CPU virtual addresses on access (#1987)
* Enable PTE null checks again

* Do address validation on EmitPtPointerLoad, and make it branchless

* PTC version increment

* Mask of pointer tag for exclusive access

* Move mask to the correct place

Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
2021-02-16 19:04:19 +01:00
pineappleEA 6f1d964801
Hide Cursor On Idle (#1993)
* Implement "Hide Cursor On Idle" option

Adds a general option to autohide the cursor after 8s have elapsed.

* Fix cursor not hiding on Windows and dispose it

* Don't dispose cursor, fix var names

* Abide by the GNOME documentation

* Fix nits

* Disabled by default, make it so it doesn't utilize any timer

* Remove *NIX time and extra lines

* Don't calculate if option is disabled

* Move if case

* Fix alignment
2021-02-15 22:48:21 +01:00
Ac_K 80ed8596c1
prepo: Implement GetSystemSessionId and add perms (#2014)
* prepo: Implement GetSystemSessionId and add perms

* address feedbacks
2021-02-11 20:24:54 +01:00
Ayato (Shahil) 0b02e08b72
Hotfix for Joy-Con Images (#2011)
The Joy-Con images should no longer be stretched on Windows
(P.S I hate Windows :p)
2021-02-11 09:57:39 +01:00