Commit graph

2882 commits

Author SHA1 Message Date
gdkchan
e933778c6a Close audio WorkBuffer transfer memory handle (#1770) 2024-02-22 19:15:24 -05:00
gdkchan
b6f4d92618 Create a single guest process per IPC message processor (#1769) 2024-02-22 19:15:23 -05:00
Mary
aa1de5772b amadeus: Fix a typo in TapFrame logic (#1767)
This fix a crash at boot in Pang Adventures
2024-02-22 19:15:23 -05:00
gdkchan
336484a213 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>
2024-02-22 19:15:23 -05:00
riperiperi
17bb4b66a3 Implement Force Early Z Register (#1755) 2024-02-22 19:15:23 -05:00
Xpl0itR
c5e12d4e72 Add a "Remove All" button to the DLC and Update windows (#1579) 2024-02-22 19:15:23 -05:00
Xpl0itR
c0fbb986bc 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
2024-02-22 19:15:23 -05:00
Mary
bb8cb953fe salieri: Fix missing guest GPU accessor missing on hashes (#1759)
This adds the guest GPU accessor to hashes computation.
As this change all the hashes from the cache, I added some migration
logic.

This is required for #1755.
2024-02-22 19:15:22 -05:00
Ac_K
950f7cf43c common: Fix last warning in SystemInfo (#1757)
* common: Fix last warning in SystemInfo

* info to Info

* fix MacOSSystemInfo file name by delete the file

* MacOSSysteminfo to MacOSSystemInfo
2024-02-22 19:15:22 -05:00
Ac_K
bb405edb53 config: Fix MaxAnisotropy value parsing (#1764) 2024-02-22 19:15:22 -05:00
Ac_K
118c495541 audio: Cleanup Ryujinx.Audio and fix OpenAL issue (#1746)
* audio: Cleanup SoundIO and fix OpenAL issue

* fix tabs by spaces

* Fix extra spaces

* Fix SoundIO.cs

* Fix ContainsAudioOutBuffer
2024-02-22 19:15:22 -05:00
riperiperi
7e388980c3 Prefer truly perfect texture matches over fomat aliased ones (#1754) 2024-02-22 19:15:22 -05:00
riperiperi
ecdbba4707 Blacklist very textures with a very small width or height from scaling (#1753) 2024-02-22 19:15:22 -05:00
Mary
7e046cc2c3 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.
2024-02-22 19:15:22 -05:00
Ac_K
928cf77087 Remove some warnings and cleaning code (#1736) 2024-02-22 19:15:22 -05:00
Ac_K
077ec25b3e pctl: Implement IsRestrictionEnabled and fix CheckFreeCommunicationPermission (#1747)
* pctl: Implement IsRestrictionEnabled and fix CheckFreeCommunicationPermission

* fix comment
2024-02-22 19:15:22 -05:00
Ac_K
bed55ede20 am: Fix GetSaveDataSize stub (#1748) 2024-02-22 19:15:22 -05:00
Ac_K
d4d562d20e am: Cleaning and stub TryPopFromFriendInvitationStorageChannel (#1738) 2024-02-22 19:15:22 -05:00
Mary
10bb814b56 amadeus: Fix reverb 3d mono wrong delay line offset (#1742)
This fix reverb 3d mono rendering using -1 instead of 1 for delay line
offset.

I also did some clean up as this value is now used by all channel
variants.

Now Resident Evil 6 goes in-gane.
2024-02-22 19:15:22 -05:00
Mary
469dffe9ca salieri: remove a wrong debug assert (#1740)
THis assert is wrong and useless now, remove it because it's annoying in
Debug.
2024-02-22 19:15:22 -05:00
Mary
7be7dfa481 amadeus: Fix possible underflow in delay time delay effect (#1739)
This fix an underflow in the setup of delay time in the delay effect.

THis fix a regression caused by Amadeus on Shovel Knight: Treasure
Trove.
2024-02-22 19:15:22 -05:00
Ac_K
37270654e3 audin: fix wrong id ListAudioInsAuto call (#1737) 2024-02-22 19:15:22 -05:00
Ac_K
5efa00a1f2 audout: Implement and fix some calls (#1725)
* audout: Implement GetAudioOutBufferCount, GetAudioOutPlayedSampleCount and FlushAudioOutBuffers

This PR implement audout service calls:
- GetAudioOutBufferCount
- GetAudioOutPlayedSampleCount
- FlushAudioOutBuffers

The RE calls just give some hints about no extra checks.
Since we use a totally different implementation because of our backend, I can't do something better for now.

SetAudioOutVolume and GetAudioOutVolume are fixed too by set/get the volume of the current opened track, previous implementation was wrong.

This fix #1133, fix #1258 and fix #1519.

Thanks to @jduncanator for this help during the implementation and all his precious advices.

* Fix some debug leftovers

* Address jD feedback
2024-02-22 19:15:22 -05:00
riperiperi
a52d9283f5 Allow copy destination to have a different scale from source (#1711)
* Allow copy destination to have a different scale from source

Will result in more scaled copy destinations, but allows scaling in some games that copy textures to the output framebuffer.

* Support copying multiple levels/layers

Uses glFramebufferTextureLayer to copy multiple layers, copies levels individually (and scales the regions).

Remove CopyArrayScaled, since the backend copy handles it now.
2024-02-22 19:15:22 -05:00
riperiperi
fc76834f5a Perform Compressed<->Uncompressed copies using Pixel Buffer Objects (#1732)
* PBO single layer copy, part 1

Still needs ability to take and set width/height slices. (using pack paramaters)

* PBO Copies pt 2

* Some fixes and cleanup.

* Misc Cleanup

* Move handle into the TextureInfo interface.

This interface is shared between texture storages and views.

* Move unscaled copy to the TextureCopy class.

* Address feedback.
2024-02-22 19:15:21 -05:00
riperiperi
f4dc83f3a9 Use backup when PTC compression is corrupt (#1704)
* Use backup when PTC compression is corrupt

* Apply suggestions from code review

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

Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
2024-02-22 19:15:21 -05:00
Ac_K
bd87561ef0 olsc: Add service olsc:u and stub some calls (#1734) 2024-02-22 19:15:21 -05:00
Ac_K
ec9f4d848b 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
2024-02-22 19:15:21 -05:00
Sera
31b2f9ca4d GLRenderer: Change between docked and handheld mode using a keybinding (#1685)
* GLRenderer: Change between docked and handheld mode using a keybinding

* nit
2024-02-22 19:15:21 -05:00
gdkchan
c847e6fdb8 Do not perform layout conversion on buffer texture flushes (#1729) 2024-02-22 19:15:21 -05:00
LDj3SNuD
5a5d1cbd27 CPU (A64): Add FP16/FP32 fast paths (F16C Intrinsics) for Fcvt_S, Fcvtl_V & Fcvtn_V Instructions. Now HardwareCapabilities uses CpuId. (#1650)
* net5.0

* CPU (A64): Add FP16/FP32 fast paths (F16C Intrinsics) for Fcvt_S, Fcvtl_V & Fcvtn_V Instructions. Switch to .NET 5.0.

Nits.

Tests performed successfully in both debug and release mode (for all instructions involved).

* Address comment.

* Update appveyor.yml

* Revert "Update appveyor.yml"

This reverts commit 27cdd59e8b.

* Remove Assembler CpuId.

* Update appveyor.yml

* Address comment.
2024-02-22 19:15:21 -05:00
gdkchan
eb4ff30191 Improvements with new .NET 5 functions or bugfixes (#1714)
* Improvements with new .NET 5 functions or bugfixes

* This no longer needs to be unsafe
2024-02-22 19:15:21 -05:00
Ac_K
6e28250949 loaders: Fix possible parsing errors of informations on some NSO (#1724)
This fix possible parsing errors of informations on some NSO where the "zero" field don't exist introduced by #1661 leading to crashes at start.

References:
https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/creport/source/creport_modules.cpp#L202
https://github.com/Thog/oss-rtld/blob/master/source/main.cpp#L14
2024-02-22 19:15:21 -05:00
gdkchan
beadf3e332 Simplify depth test state updates (#1695) 2024-02-22 19:15:21 -05:00
gdkchan
a722d393e2 Fix buffer to texture copy with remap enabled (#1721) 2024-02-22 19:15:21 -05:00
EmulationFanatic
1bfd4f9e1d Specify the X64 version of .NET 5, and change the build command to be the right one (#1719) 2024-02-22 19:15:21 -05:00
Mary
6abb78213a 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
2024-02-22 19:15:21 -05:00
Mary
f735007f1b shader cache: Fix possible race causing crashes on manifest at startup (#1718)
* shader cache: Fix possible race causing crashes on manifest at startup

This fix a misplace function call ending up causing possibly two write
on the cache.info at the same time.

* shader cache: Make RemoveManifestEntries async too to be sure all operations are perform before starting the game
2024-02-22 19:15:21 -05:00
Mary
689056f15b shader cache: Fix invalid virtual address clean up (#1717)
* shader cache: Fix invalid virtual address clean up

This fix an issue causing the virtual address of texture descriptors to
not be cleaned up when caching and instead cleaning texture format and swizzle.

This should fix duplicate high duplication in the cache for certain
games and possible texture corruption issues.

**THIS WILL INVALIDATE ALL SHADER CACHE LEVELS CONSIDERING THE NATURE OF THE ISSUE**

* shader cache: Address gdk's comment
2024-02-22 19:15:20 -05:00
gdkchan
e96c053dc3 Propagate zeta format properly (#1716) 2024-02-22 19:15:20 -05:00
Ac_K
a6e5e2470e am: Fix VR enabled by default (#1715)
This PR fix an issue I've made in #1688 which is enabled VR as default.
It could cause rendering issues in games when VR mode isn't used, as users have reported in Smash:
2024-02-22 19:15:20 -05:00
Ac_K
33f60a64a9 am/lbl/hid/pctl: Enabled VR Rendering (#1688)
* am/lbl/hid/pctl: Enabled VR Rendering

This PR enable VR rendering on games which support it through the Toy-Con VR Goggles.

Please remember Ryujinx currently don't support console SixAxis sensor and for now, in some games, the view can't be moved.

Everything is implemented accordingly to RE:
- am: ICommonStateGetter: SetVrModeEnabled, BeginVrModeEx, EndVrModeEx.
- lbl: ILblController: SetBrightnessReflectionDelayLevel, GetBrightnessReflectionDelayLevel, SetCurrentAmbientLightSensorMapping, GetCurrentAmbientLightSensorMapping, SetCurrentBrightnessSettingForVrMode, GetCurrentBrightnessSettingForVrMode, EnableVrMode, DisableVrMode, IsVrModeEnabled.
- pctl: IParentalControlService: ConfirmStereoVisionPermission, ConfirmStereoVisionRestrictionConfigurable, GetStereoVisionRestriction, SetStereoVisionRestriction, ResetConfirmedStereoVisionPermission, IsStereoVisionPermitted.
- hid: IHidServer: ResetSevenSixAxisSensorTimestamp is stubbed because we don't support console SixAxisSensor for now.

Maybe we could add a setting later to enable or disable VR. But I think it's fine to keep this always available since you have to enable it in games.

* Fix permission flag check

* Address gdkchan feedback
2024-02-22 19:15:20 -05:00
Mary
a9ddd875d1 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.
2024-02-22 19:15:20 -05:00
EmulationFanatic
493cfe408b 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
2024-02-22 19:15:20 -05:00
Xpl0itR
f72e76c49b Don't warn when debug feature is enabled in debug mode (#1707) 2024-02-22 19:15:20 -05:00
Mary
56bb2ec0da 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
2024-02-22 19:15:20 -05:00
mageven
88aa4cea6c IPSwitch: Quick fix to patch sets toggling (#1668)
* IPSwitch: Quick fix to patch sets toggling

* fmt fix: newlines before continue and return
2024-02-22 19:15:20 -05:00
Sera
3b2dfd6117 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
2024-02-22 19:15:20 -05:00
riperiperi
67feb9b599 Use "Screen Scissor" as size hint for render targets (#1703)
"Screen scissor" is the minimum size of all render targets, and is set when any render target is bound on NVN or OpenGL. Since it works on all active texture's real sizes, it is therefore more reliable than viewport 0's width, and is actually set before clear.

This fixes a regression with Hyrule Warriors: Age Of Calamity's cubemaps, which did not set viewport dimensions before clear. This resulted in attempting to create a cubemap with rectangular sides, which is logically and physically impossible. (also it just fails)
2024-02-22 19:15:20 -05:00
Mary
2f1f7a3c4e 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.
2024-02-22 19:15:19 -05:00