Commit graph

381 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
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
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
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
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
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
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
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
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
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
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
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
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
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
Ayato (Shahil)
172ec326e5
Update Joy-Con images 2 (#2004)
* Update Joy-Con Images 2

This Updates the Joy-Con images, Changes include, adding a top view to the {Joy-Con Pair} image and {Joy-Con Left and Right} Images and adding a side view to {Joy-Con Left and Right} images, the colours
should be less washed out as well and I also decided to clean up the raw image because even though you could not see it in the GUI, the Images themselves looked very messy when opened in a Vector tool

* Fix Sily Right Joy Con mistake

* Make ZL and ZR more visable
2021-02-11 01:34:36 +01:00
Xpl0itR
94f93727cf
Load default config when an invalid config is found (#1008)
- Bind toggle events after setting up their current values. This fixes the issue where the config is saved 10 times when the main window is opened 😬

- Write to disk immediately to decrease the chances of corruption
2021-02-09 10:24:37 +01:00
edisionnano
1319eda8b7
Fix Updater Icon On Linux (#1995)
* Fix Linux Icon

* Fix identation

* Move the icon to the private constructor
2021-02-08 10:27:12 +11:00
EmulationFanatic
9c2f851d39
Add PPTC acronym to settings page (#1974) 2021-01-29 14:20:02 +11:00
ShahilSharma
9eb0ab05c6
Enable Docked Mode by Default (#1953)
Enables Docked Mode by default, since I see no reason to keep it off by Default.
2021-01-28 13:55:01 +11:00
mageven
d1e24ba5c2
Initial Setup: Reload keys before verifying firmware (#1955)
* Initial Setup: Reload keys before verifying firmware

Also, display the NoKeys dialog if keyset is empty when verifying
firmware.

* LoadApplications: Remove the lone debug log and print the error directly
2021-01-26 18:45:07 +01:00
EmulationFanatic
b0d3f1d06f
GUI Update: Fix controller input window to fit all images without scrolling (#1962)
Currently, when configuring controller input with an "Xinput Controller" or "Unmapped Controller", the window does not fit the images for Pro Controller (width limited) or Joycon Pair (width and height limited). This PR proportionally enlarges the window so that no scrolling is ever necessary to fully see the controller image.
2021-01-26 16:08:22 +11:00
EliEron
ad491b5570
Prevent Display Sleep on Windows while running a game (#1850)
Co-authored-by: EliEron <example@example.com>
2021-01-25 10:02:00 +11:00
ShahilSharma
8d4bee3ea9
Update Controller Images (#1951)
This updates the old Images used for the input section for Ryujinx. The old one didn't play nice with the some GTK themes like light mode, this new one does.
2021-01-25 09:21:49 +11:00
mageven
c72f78b4d4
Fix SL/SR typo in keyboard controller mapping (#1938) 2021-01-20 18:59:51 +01:00
Sera
2fe3b8e58c
Fix some GLXBadDrawable crashes on linux (#1900)
Fixes the crashes on linux when you stop emulation, and when you try to
exit the emulator while a game is running.
Also tested on windows without problems on my side.
2021-01-19 13:31:59 +11:00
mageven
5e1a839eaa
Emulate a circular zone for keyboard analog sticks (#1906) 2021-01-19 00:56:53 +01:00
pineappleEA
4da6742861
Fix Linux Icon (#1927) 2021-01-19 07:33:58 +11:00
Bruno Macabeus
1e5b37c94f
settings: add Show Confirm Exist toggle (#1856) 2021-01-14 23:30:52 +01:00
Bruno Macabeus
b81f19613f
ui: disable "Simulate Wake-up" when no game is running (#1863) 2021-01-11 16:03:37 +01:00
Ac_K
d684d71c4f Hotfix for Updater introduced in #1859 2021-01-10 18:20:10 +01:00
Ac_K
a9cb31e75f
gui: Refactoring Part 1 (#1859)
* gui: Refactoring Part 1

* Fix ProfileDialog.glade path

* Fix Application.Quit assert

* Fix TitleUpdateWindow parent

* Fix TitleUpdate selected item

* Remove extra line in TitleUpdateWindow

* Fix empty assign of Enum.TryParse

* Add Patrons list in the About Window

* update about error messages
2021-01-08 09:14:13 +01:00
EmulationFanatic
0a55657bd2
Enable Profiled Persistent Translation Cache (PPTC) by default (#1844)
* Enable Profiled Persistent Translation Cache (PPTC) by default

Enables PPTC by default. Enough time has passed and enough games tested that it should be the preferred setting for 99.9% of games. In case we are worried about PPTC files being put on the user's disk, shader cache already does this by default and generates about the same size files on average, so this should no longer be a concern.

* Update config.json with PTC set to true

* Updated _schema.json to set PPTC to true.
2021-01-01 15:36:47 +01:00
Mary
b1d3cfd2da
Distribute with OpenAL Soft on Windows (#1847)
* Distribute with OpenAL Soft on Windows

This remove dependency on OpenAL EA on Windows and allows to operate with both backend without any user interventions.

Co-authored-by: jduncanator <jduncanator@hotmail.com>

* Fix Atmosphere utf8 issue

Co-authored-by: jduncanator <jduncanator@hotmail.com>
2020-12-31 09:08:09 +11:00
AigleSpartiate
9a808fe484
Fix button press issue (#1836)
A small code change to fix the issue that was forcing the user to press the "Yes" button twice to restart Ryujinx after it had been updated, instead of only once.
2020-12-26 15:59:41 +01:00
riperiperi
10aa11ce13
Interrupt GPU command processing when a frame's fence is reached. (#1741)
* Interrupt GPU command processing when a frame's fence is reached.

* Accumulate times rather than %s

* Accurate timer for vsync

Spin wait for the last .667ms of a frame. Avoids issues caused by signalling 16ms vsync. (periodic stutters in smo)

* Use event wait for better timing.

* Fix lazy wait

Windows doesn't seem to want to do 1ms consistently, so force a spin if we're less than 2ms.

* A bit more efficiency on frame waits.

Should now wait the remainder 0.6667 instead of 1.6667 sometimes (odd waits above 1ms are reliable, unlike 1ms waits)

* Better swap interval 0 solution

737 fps without breaking a sweat. Downside: Vsync can no longer be disabled on games that use the event heavily (link's awakening - which is ok since it breaks anyways)

* Fix comment.

* Address Comments.
2020-12-17 19:39:52 +01:00
Ac_K
11222516c4
gui/gpu: Implement setting and toggle for Aspect Ratio (#1777)
* gui/gpu: Implement setting and toggle for Aspect Ratio

* address gdkchan feedback and add 16:10

* fix config.json file

* Fix rebase

* Address gdkchan feedback

* Address rip feedback

* Fix aspectWidth
2020-12-15 23:19:07 -03:00
Ac_K
808380690c
am/gui: Implement Wake-up message (#1750)
* am/gui: Implement Wake-up message.

This implement the ability to send a Wake-up (Resume) message to the guest.
Sometime games needs to Sleep and Wake-up the switch to unlock some ingame features.

* Address gdkchan feedback
2020-12-15 21:41:42 -03:00
riperiperi
c9b6be1ef8
NVIDIA Thread create/delete stutter workarounds (#1760)
* Thread create/delete stutter workarounds Pt 1

* As tiered compilation is disabled, disable quick jit too

Should result in tier 1 compilation all the time

* Fix rebase.
2020-12-09 19:36:08 -03:00
gdkchan
48278905d1
Rewrite scheduler context switch code (#1786)
* Rewrite scheduler context switch code

* Fix race in UnmapIpcRestorePermission

* Fix thread exit issue that could leave the scheduler in a invalid state

* Change context switch method to not wait on guest thread, remove spin wait, use SignalAndWait to pass control

* Remove multi-core setting (it is always on now)

* Re-enable assert

* Remove multicore from default config and schema

* Fix race in KTimeManager
2020-12-09 19:20:05 -03:00
Ac_K
668720b088
logger: Add build version to the log file names (#1782) 2020-12-07 20:29:22 +11:00
gdkchan
cf6cd71488
IPC refactor part 2: Use ReplyAndReceive on HLE services and remove special handling from kernel (#1458)
* IPC refactor part 2: Use ReplyAndReceive on HLE services and remove special handling from kernel

* Fix for applet transfer memory + some nits

* Keep handles if possible to avoid server handle table exhaustion

* Fix IPC ZeroFill bug

* am: Correctly implement CreateManagedDisplayLayer and implement CreateManagedDisplaySeparableLayer

CreateManagedDisplaySeparableLayer is requires since 10.x+ when appletResourceUserId != 0

* Make it exit properly

* Make ServiceNotImplementedException show the full message again

* Allow yielding execution to avoid starving other threads

* Only wait if active

* Merge IVirtualMemoryManager and IAddressSpaceManager

* Fix Ro loading data from the wrong process

Co-authored-by: Thog <me@thog.eu>
2020-12-02 00:23:43 +01:00
Xpl0itR
e383c41b6e
Add a "Remove All" button to the DLC and Update windows (#1579) 2020-12-01 23:51:49 +01:00
Xpl0itR
bd8d28c59d
Add option to start games in fullscreen mode (#1580)
* Add option to start games in fullscreen mode

* Add command line option

* Use pascal case on menu item
2020-12-01 23:02:27 +01:00
Ac_K
a04a1b663d
config: Fix MaxAnisotropy value parsing (#1764) 2020-12-01 21:44:04 +01:00
Mary
245f8a7eee
ui: Check last played datetime validity against current culture (#1730)
This is an issue happening when you change your datetime format on your
system and try to sort via last played datetime. DateTime.Parse use the
current thread culture and will not parse date correctly, effectively
causing a crash.

As such, I added a check when loading the game list that ensure that the
datetime is valid in current culture.

Fix #1727.
2020-11-27 19:05:36 +01:00
Ac_K
b1877632cf
Remove some warnings and cleaning code (#1736) 2020-11-27 18:57:20 +01:00
Ac_K
f8f23bf899
gui: Toggle Docked/Handheld mode and VSync by clicking status bar (#1726)
* gui: Toggle between docked/handheld mode by clicking status bar

This PR just add a way to toggle between the docked and the handheld mode by clicking the lable in the status bar.
Nothing more.

* Fix glade file formatting

* Add VSync toggle
2020-11-19 11:34:28 +11:00
Sera
41ab43151b
GLRenderer: Change between docked and handheld mode using a keybinding (#1685)
* GLRenderer: Change between docked and handheld mode using a keybinding

* nit
2020-11-19 00:15:44 +01:00
Mary
863edae328
shader cache: Fix Linux boot issues (#1709)
* shader cache: Fix Linux boot issues

This rollback the init logic back to previous state, and replicate the
way PTC handle initialization.

* shader cache: set default state of ready for translation event to false

* Fix cpu unit tests
2020-11-17 22:40:19 +01:00
Mary
4bc4cacdd0
ui diag: Add missing error message for ApplicationNotFound (#1693)
I missed to add the error messages for this error code on the initial
PR, this fix it.
2020-11-15 21:26:49 +01:00
EmulationFanatic
d3147bab5a
Standardize to camel-case: option to check for updates on launch (#1698)
* Standardize to camel-case: option to check for updates on launch

Updates the "Check for updates on launch" to read instead "Check For Updates On Launch" to be consistent with camel-case options elsewhere in the UI. This time done with manual editing instead of with the Glade app.

* Updated to match general English rules on articles and conjunctions
2020-11-15 21:11:23 +01:00
Xpl0itR
58bc6897a5
Don't warn when debug feature is enabled in debug mode (#1707) 2020-11-15 20:56:44 +01:00
Mary
aa129fdbdf
infra: Migrate to .NET 5 (#1694)
* infra: Migrate to .NET 5

This migrate projects and CI to .NET 5

* Remove language version restrictions (now on 9.0 by default)

* infra: pin .NET 5 to avoid later issues

* infra: Cleanup csproj files

* infra: update dependencies

* infra: Add temporary workaround for a bug in Vector128.Create

see https://github.com/dotnet/runtime/issues/44704 for more informations
2020-11-15 19:27:15 +01:00
Sera
04e048efcf
SettingsWindow: Add an Apply button (#1562)
* SettingsWindow: Add an Apply button

Adds an apply button that doesnt close the settings window when saving
the changes.

* fix the apply button staying turned on after clicking it
2020-11-13 01:50:28 +01:00
Mary
48f6570557
Salieri: shader cache (#1701)
Here come Salieri, my implementation of a disk shader cache!

"I'm sure you know why I named it that."
"It doesn't really mean anything."

This implementation collects shaders at runtime and cache them to be later compiled when starting a game.
2020-11-13 00:15:34 +01:00
Mary
61e67b64ea
updater: Ignore first commandline argument when passing commandline to updated binary (#1674)
Fix a regression caused by #1643.
2020-11-06 19:46:22 +01:00
CeruleanSky
b5a760bde9
Preserve command line arguments when updater restarts Ryujinx (#1643)
Command line arguements are not preserved by the updater, and this causes an issue when the updater restarts Ryujinx in portable mode as it will create/use/modify its default directory instead.

This simple pull addresses the first part of #1594 

As far as the second part of the issue, where the updater perhaps overzealously deletes everything but log files and folders, which causes problems in portable installs with a user subfolder or something else inside the Ryujinx folder. 

Perhaps an UpdateList.txt containing a list of files that the updater deletes is included in the ryujinx.zip/tar.gz/etc and placed in the upacked directory for the updater to use upon the next upgrade.

The build system can run something like `forfiles /s /m *.txt /c "cmd /c echo @relpath"` or the correct command for the OS and include it in the distribution, or it could be generated by the updater itself.
2020-10-29 23:07:10 +01:00
emmauss
9f13f957af
Motion Fixes (#1589)
* fix stalling when server is offline

* add retry timer to fail server connections, fix alt slot number

* fix alt slot key issue

* fix crash when saving controller config with empty fields

* code fixes

* add index check in motion hid update, made HandleResponse async

Co-authored-by: Emmanuel <nhv3@localhost.localdomain>
2020-10-28 20:52:07 +01:00
riperiperi
b4d8d893a4
Memory Read/Write Tracking using Region Handles (#1272)
* WIP Range Tracking

- Texture invalidation seems to have large problems
- Buffer/Pool invalidation may have problems
- Mirror memory tracking puts an additional `add` in compiled code, we likely just want to make HLE access slower if this is the final solution.
- Native project is in the messiest possible location.
- [HACK] JIT memory access always uses native "fast" path
- [HACK] Trying some things with texture invalidation and views.

It works :)

Still a few hacks, messy things, slow things

More work in progress stuff (also move to memory project)

Quite a bit faster now.
- Unmapping GPU VA and CPU VA will now correctly update write tracking regions, and invalidate textures for the former.
- The Virtual range list is now non-overlapping like the physical one.
- Fixed some bugs where regions could leak.
- Introduced a weird bug that I still need to track down (consistent invalid buffer in MK8 ribbon road)

Move some stuff.

I think we'll eventually just put the dll and so for this in a nuget package.

Fix rebase.

[WIP] MultiRegionHandle variable size ranges

- Avoid reprotecting regions that change often (needs some tweaking)
- There's still a bug in buffers, somehow.
- Might want different api for minimum granularity

Fix rebase issue

Commit everything needed for software only tracking.

Remove native components.

Remove more native stuff.

Cleanup

Use a separate window for the background context, update opentk. (fixes linux)

Some experimental changes

Should get things working up to scratch - still need to try some things with flush/modification and res scale.

Include address with the region action.

Initial work to make range tracking work

Still a ton of bugs

Fix some issues with the new stuff.

* Fix texture flush instability

There's still some weird behaviour, but it's much improved without this. (textures with cpu modified data were flushing over it)

* Find the destination texture for Buffer->Texture full copy

Greatly improves performance for nvdec videos (with range tracking)

* Further improve texture tracking

* Disable Memory Tracking for view parents

This is a temporary approach to better match behaviour on master (where invalidations would be soaked up by views, rather than trigger twice)

The assumption is that when views are created to a texture, they will cover all of its data anyways. Of course, this can easily be improved in future.

* Introduce some tracking tests.

WIP

* Complete base tests.

* Add more tests for multiregion, fix existing test.

* Cleanup Part 1

* Remove unnecessary code from memory tracking

* Fix some inconsistencies with 3D texture rule.

* Add dispose tests.

* Use a background thread for the background context.

Rather than setting and unsetting a context as current, doing the work on a dedicated thread with signals seems to be a bit faster.

Also nerf the multithreading test a bit.

* Copy to texture with matching alignment

This extends the copy to work for some videos with unusual size, such as tutorial videos in SMO. It will only occur if the destination texture already exists at XCount size.

* Track reads for buffer copies. Synchronize new buffers before copying overlaps.

* Remove old texture flushing mechanisms.

Range tracking all the way, baby.

* Wake the background thread when disposing.

Avoids a deadlock when games are closed.

* Address Feedback 1

* Separate TextureCopy instance for background thread

Also `BackgroundContextWorker.InBackground` for a more sensible idenfifier for if we're in a background thread.

* Add missing XML docs.

* Address Feedback

* Maybe I should start drinking coffee.

* Some more feedback.

* Remove flush warning, Refocus window after making background context
2020-10-16 17:18:35 -03:00
riperiperi
aec8177850
Replace Host FPS with GPU command queue load ("Fifo %") (#1585)
* Replace Host FPS with FIFO%

* Change measurement order. Improve calculation.

Now at 100% when FIFO is blocking game exectution, rather than "0".

* Address feedback (1)

* Remove Host FPS

* FIFO rather than Fifo

* Address Ac_k feedback

* Rebase
2020-10-14 07:54:42 +11:00
Thog
ace67ed324 Rollback the CreateExitDialog function that was lost with auto updater 2020-10-10 01:22:25 +02:00
Xpl0itR
ce87650d81
Show confirmation dialog when attempting to close while a game is loaded (#1582) 2020-10-10 01:06:48 +02:00
Mary
8506b7a334
Fix exiting emulator with multi programs (#1590)
THis fix a bug introduced in #1560 that would cause "Stop emulation" to
actually restart the game all the time.
2020-10-10 00:52:11 +02:00
emmauss
26319d5ab3
Add Motion controls (#1363)
* Add motion controls

Apply suggestions from code review

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

* cleanup

* add reference orientation and derive relative orientation from it

* cleanup

* remove unused variable and strange file

* Review_2.

* change GetInput to TryGetInput

* Review_3.

Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: LDj3SNuD <dvitiello@gmail.com>
2020-09-29 23:32:42 +02:00
Thog
a6f8a0b01e Do not show update being availaible when appveyor is still building 2020-09-29 22:52:41 +02:00
MelonSpeedruns
a15459366e
Appveyor Ryujinx Updater (#1403)
Co-authored-by: Xpl0itR <xpl0itr@outlook.com>
2020-09-29 22:05:25 +02:00
Ac_K
4f65043ad7
Basic impl of Error Applet (#1551) 2020-09-28 00:00:38 +02:00
Mary
33f8284bc0
hle/ui: Basic multi programs support (#1560)
* hos/gui: Add a check of NCA program index in titleid

This add a check to `ApplicationLoader` for the last 2 digits of the game TitleId who seems to be the NCA program index.
We currently return the last index, instead of the lower one.
Same check is added to ApplicationLibrary in the UI.

I've cleaned up both file too.

* hle: implement partial relaunch logic

TODO: make the emulator auto relauch.

* Handle auto relaunch

* hle: Unify update usage system

* hle: Implement support of multi programs in update system

* Add some documentation

* Address rip's comment

Co-authored-by: Ac_K <Acoustik666@gmail.com>
2020-09-21 13:45:30 +10:00
Xpl0itR
d0e36b7b19
Move the open logs folder from setting into the File menu in the main window (#1550) 2020-09-20 14:31:05 +10:00
Mary
2ce59c44bc
Fix debug Config using res scaling 2x by default (#1546)
As the title say, this restore the value to 1.
2020-09-13 11:02:45 +10:00
Alex Barney
1bb7fdaca4
Update to LibHac 0.12.0 (#1485)
* Update to LibHac 0.12.0

* Auto-formatting. Fixed a bug in SetApplicationCopyrightImage
2020-09-01 17:08:59 -03:00
Mary
3ec911a630
ui: Initial better user error reporting (#1503)
This update the "No keys" dialog and block starting NSP/XCI/NCA without firmware.

Also propose to the user if they want to install firmware if they start an untrimmed XCI and remove KEYS.md as it was completely outdated.

PS: Also fix a bug with "&" in URL with OpenUrl on Windows.
2020-09-01 11:09:42 +02:00
Mary
4f3ae6f62c
Remove the Ryujinx.Debugger project (#1506)
This project wasn't really used by anyone and isn't worth mantaining.

This commit remove the profiler entirely from Ryujinx and remove the associated CI tasks.
2020-08-30 19:06:05 +02:00
mageven
b9398f1f3a
Allow launching with custom data directories (#1505)
* Allow launching with custom data directories

Don't load alternate keys when using custom directory

* Address gdkchan's comments

* Misc fixes to log levels

Added more enabled log levels by default

Moved successful config updation to Notice as
1. It's not a warning
2. Warnings could've been disabled by the config load and hence message
   would be lost
2020-08-30 18:51:53 +02:00
mageven
27179d0218
Improve multi-controller support in HID and Controller Applet (#1453)
* Initial commit

Enable proper LED patterns
Toggle Hotkeys only on focus
Ignore Handheld on Docked mode
Remove PrimaryController
Validate NpadIdType
Rewrite NpadDevices to process config in update loop
Cleanup

* Notify in log periodically when no matched controllers

* Remove duplicate StructArrayHelpers in favor of Common.Memory

Fix struct padding CS0169 warns in Touchscreen

* Remove GTK markup from Controller Applet

Use IList instead of List
Explicit list capacity in 1ms loop
Fix formatting

* Restrict ControllerWindow to show valid controller types

Add selected player name to ControllerWindow title

* ControllerWindow: Fix controller type initial value

NpadDevices: Simplify default battery charge

* Address AcK's comments

Use explicit types and fix formatting

* Remove HashSet for SupportedPlayers

Fixes potential exceptions due to race

* Fix ControllerSupportArg struct packing

Also comes with two revisions of struct for 4/8 players max.
2020-08-23 22:54:11 +02:00
Mary
a389dd59bd
Amadeus: Final Act (#1481)
* Amadeus: Final Act

This is my requiem, I present to you Amadeus, a complete reimplementation of the Audio Renderer!

This reimplementation is based on my reversing of every version of the audio system module that I carried for the past 10 months.
This supports every revision (at the time of writing REV1 to REV8 included) and all features proposed by the Audio Renderer on real hardware.

Because this component could be used outside an emulation context, and to avoid possible "inspirations" not crediting the project, I decided to license the Ryujinx.Audio.Renderer project under LGPLv3.

- FE3H voices in videos and chapter intro are not present.
- Games that use two audio renderer **at the same time** are probably going to have issues right now **until we rewrite the audio output interface** (Crash Team Racing is the only known game to use two renderer at the same time).

- Persona 5 Scrambler now goes ingame but audio is garbage. This is caused by the fact that the game engine is syncing audio and video in a really aggressive way. This will disappears the day this game run at full speed.

* Make timing more precise when sleeping on Windows

Improve precision to a 1ms resolution on Windows NT based OS.
This is used to avoid having totally erratic timings and unify all
Windows users to the same resolution.

NOTE: This is only active when emulation is running.
2020-08-17 22:49:37 -03:00
mageven
0de5367369
PPTC GUI: Purge all versioned caches on click (#1454)
* PPTC GUI: Purge all versioned caches on click

* Address AcK's comments

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

* nit: Explicit declarations

Co-authored-by: Ac_K <Acoustik666@gmail.com>
2020-08-13 19:31:13 +02:00
Xpl0itR
58f65b6523
Replace the Audio Backend ComboBoxText to a ComboBox with a custom model (#1451)
* Use a combobox with a custom model to be able to disable entries within it

* Address Ack's comments
2020-08-09 22:46:06 +02:00
mageven
e19193e073
Rename DebugLevel Performance to Slowdowns (#1450) 2020-08-07 15:30:06 +02:00
mageven
a33dc2f491
Improved Logger (#1292)
* Logger class changes only

Now compile-time checking is possible with the help of Nullable Value
types.

* Misc formatting

* Manual optimizations

PrintGuestLog
PrintGuestStackTrace
Surfaceflinger DequeueBuffer

* Reduce SendVibrationXX log level to Debug

* Add Notice log level

This level is always enabled and used to print system info, etc...
Also, rewrite LogColor to switch expression as colors are static

* Unify unhandled exception event handlers

* Print enabled LogLevels during init

* Re-add App Exit disposes in proper order

nit: switch case spacing

* Revert PrintGuestStackTrace to Info logs due to #1407

PrintGuestStackTrace is now called in some critical error handlers
so revert to old behavior as KThread isn't part of Guest.

* Batch replace Logger statements
2020-08-04 01:32:53 +02:00
mageven
c11855565e
Implement Software Keyboard GTK frontend (#1434)
* Implement SwKbd GUI

* Relocate UI handler to Emu Context from Config

Also create a common interface for UI handlers in the context and specialize for Gtk

Add basic input length validation in InputDialog

* Add Transfer Memory support to AppletCreator

Read Initial Text for SwKbd using Transfer Memory

* Improve InputDialog widget

Improve length validation
Has extra label to show validition info
Handle potential errors and log them

* Misc improvements

* Improve string validation
* Improve error handling
* Remove tuple in struct
* Address formatting nits

* Add proper Cancel functionality

Also handle GUI errors in UI handler

* Address jD's comments

* Fix _uiHandler init

* Address AcK's comments
2020-08-03 03:30:58 +02:00
mageven
f0c91d9efb
Facilitate OpenGL debug logging via GUI (#1373)
* Allow printing GL Debug logs with GUI options

Improve GL Debugger

Make the new option persistent

Address gdkchan's comments
- Rename enum to GraphicsDebugLevel
- Move Debugger Init to Renderer Init
- Fix formatting

* nit: newlines
2020-08-02 16:41:24 +02:00
emmauss
3c1f220c5e
fix fullscreen toggling (#1364) 2020-07-23 23:12:19 +10:00
mageven
4aa47a66c6
Better TimeZone entry in System Settings (#1254)
* Better timezone labels in System TimeZone

Replace with GtkEntry with auto-complete

Also removed async task as now loading is fast

Address Thog's comments

self-nit: Remove string alias

Address AcK's comments

* Improve parsing
* Optimize and fix string matching

Address jD's comments

* Also, make abbreviations searchable
* Optimize EntryCompletion's MatchFunc

* nit: Result.IsFailure()

* Fix potential crash on opening Settings window w/o FW installed
2020-07-21 06:14:42 +02:00
Xpl0itR
21dfa4974a
A couple fixes for the audio backend GUI option (#1360)
* Detect available audio backends in the gui on a separate thread and

hardcode dummy backend in the dropdown and select it by default

* Use a Task rather than a Thread

* Modify UI on UI thread
2020-07-21 05:33:23 +02:00
gdkchan
4d02a2d2c0
New NVDEC and VIC implementation (#1384)
* Initial NVDEC and VIC implementation

* Update FFmpeg.AutoGen to 4.3.0

* Add nvdec dependencies for Windows

* Unify some VP9 structures

* Rename VP9 structure fields

* Improvements to Video API

* XML docs for Common.Memory

* Remove now unused or redundant overloads from MemoryAccessor

* NVDEC UV surface read/write scalar paths

* Add FIXME comments about hacky things/stuff that will need to be fixed in the future

* Cleaned up VP9 memory allocation

* Remove some debug logs

* Rename some VP9 structs

* Remove unused struct

* No need to compile Ryujinx.Graphics.Host1x with unsafe anymore

* Name AsyncWorkQueue threads to make debugging easier

* Make Vp9PictureInfo a ref struct

* LayoutConverter no longer needs the depth argument (broken by rebase)

* Pooling of VP9 buffers, plus fix a memory leak on VP9

* Really wish VS could rename projects properly...

* Address feedback

* Remove using

* Catch OperationCanceledException

* Add licensing informations

* Add THIRDPARTY.md to release too

Co-authored-by: Thog <me@thog.eu>
2020-07-12 05:07:01 +02:00
mageven
189c0c9c72
Implement modding support (#1249)
* Implement Modding Support

* Executables: Rewrite to use contiguous mem and Spans

* Reorder ExeFs, Npdm, ControlData and SaveData calls

After discussion with gdkchan, it was decided it's best to call
LoadExeFs after all other loads are done as it starts the guest process.

* Build RomFs manually instead of Layering FS

Layered FS approach has considerable latency when building the final
romfs. So, we manually replace files in a single romfs instance.

* Add RomFs modding via storage file

* Fix and cleanup MemPatch

* Add dynamically loaded NRO patching

* Support exefs file replacement

* Rewrite ModLoader to use mods-search architecture

* Disable PPTC when exefs patches are detected

Disable PPTC on exefs replacements too

* Rewrite ModLoader, again

* Increased maintainability and matches Atmosphere closely
* Creates base mods structure if it doesn't exist
* Add Exefs partition replacement
* IPSwitch: Fix nsobid parsing

* Move mod logs to new LogClass

* Allow custom suffixes to title dirs again

* Address nits

* Add a per-App "Open Mods Directory" context menu item

Creates the path if not present.

* Normalize tooltips verbiage

* Use LocalStorage and remove unused namespaces
2020-07-09 14:31:15 +10:00
riperiperi
484eb645ae
Implement Zero-Configuration Resolution Scaling (#1365)
* Initial implementation of Render Target Scaling

Works with most games I have. No GUI option right now, it is hardcoded.

Missing handling for texelFetch operation.

* Realtime Configuration, refactoring.

* texelFetch scaling on fragment shader (WIP)

* Improve Shader-Side changes.

* Fix potential crash when no color/depth bound

* Workaround random uses of textures in compute.

This was blacklisting textures in a few games despite causing no bugs. Will eventually add full support so this doesn't break anything.

* Fix scales oscillating when changing between non-native scales.

* Scaled textures on compute, cleanup, lazier uniform update.

* Cleanup.

* Fix stupidity

* Address Thog Feedback.

* Cover most of GDK's feedback (two comments remain)

* Fix bad rename

* Move IsDepthStencil to FormatExtensions, add docs.

* Fix default config, square texture detection.

* Three final fixes:

- Nearest copy when texture is integer format.
- Texture2D -> Texture3D copy correctly blacklists the texture before trying an unscaled copy (caused driver error)
- Discount small textures.

* Remove scale threshold.

Not needed right now - we'll see if we run into problems.

* All CPU modification blacklists scale.

* Fix comment.
2020-07-07 04:41:07 +02:00
Mary
686eceb9f6
Readd SoundIO as OpenAL fallback (#1356) 2020-07-04 02:38:39 +02:00
Xpl0itR
bf87f02c0c
Changes to game list reloading (#1334)
* Only reload list when game dirs are changed

* do not reload game list when game is loaded
2020-07-04 01:29:36 +02:00
Xpl0itR
7cb6532971
Implement audio backend configuration option (#1325)
* Implement audio backend configuration option

* Use OpenAL by default

* Increment version number in config.json

and add 30px to the height of the settings window

* nits

* capitalise audio backend names
2020-07-04 01:16:49 +02:00
Sera
af72875bee
GameTableContextMenu: Implemented options for PPTC (#1321)
* GameTableContextMenu: Implemented options for PPTC

Added an option for purging the cache and for opening the PPTC directory.

* Fixed formating and used a better naming scheme for some of the variables.

* Fixed some nits

* Fixed more nits

* Rearranged the context menu and fixed some nits

* Addressed LDj's review
2020-07-04 01:04:04 +02:00
Sera
8b8039e8b9
SettingsWindow: Add the ability to add multiple game directories at once (#1314)
* SettingsWindow: Add the ability to choose multiple game directories in one go

* Adressed emmauss's suggestion

* Simplified the check for duplicate game directories

As per Xpl0itr's and emmauss's suggestion, I simplified the loop that checks if the selected game directories are already added.

* Fixed a nit
2020-07-04 00:57:03 +02:00
Xpl0itR
68a6960617
Remember GUI column sort and separate hotkey settings from emulated input settings (#1223)
* Separate hotkey settings from emulated input settings

* Remember gui column sort

* nit

* fix schema

* nit

* Remove unused SaveDataPath to speed up game list loading

* Reset the vertical scrollbar to the top when titles finish loading
2020-06-26 12:30:16 +02:00
Xpl0itR
2ed9db1fcd
Implement dlc management window (#1313)
* Implement dlc management window

* reduce repetition

* Implement per NCA toggling of DLC rather than per container
2020-06-23 10:32:07 +10:00