Commit graph

2882 commits

Author SHA1 Message Date
riperiperi
3e23730705 Use a basic cubic interpolation for the audren upsampler (#3129)
Before, it was selecting nearest neighbour, which sounded terrible. This is likely temporary til the upsampling algorithm used by the switch is reversed.

Fixes bad audio in Skyward Sword HD.
2024-02-22 19:16:15 -05:00
Mary
45dca16872 amadeus: Fix PCMFloat datasource command v1 (#3127)
Really simple copy pasta error here.

Shouldn't affect anything as float support was added at the same REV as
datasource command v2.
2024-02-22 19:16:15 -05:00
gdkchan
8f5b7dbd4d Do not allow render targets not explicitly written by the fragment shader to be modified (#3063)
* Do not allow render targets not explicitly written by the fragment shader to be modified

* Shader cache version bump

* Remove blank lines

* Avoid redundant color mask updates

* HostShaderCacheEntry can be null

* Avoid more redundant glColorMask calls

* nit: Mask -> Masks

* Fix currentComponentMask

* More efficient way to update _currentComponentMasks
2024-02-22 19:16:15 -05:00
Mary
e919bbb219 amadeus: Fix limiter correctness (#3126)
This fixes missing audio on Nintendo Switch Sports Online Play Test.
2024-02-22 19:16:15 -05:00
gdkchan
6e59100a92 When copying linear textures, DMA should ignore region X/Y (#3121) 2024-02-22 19:16:15 -05:00
skrek
11e49fd5df Adjusting how deadzones are calculated (#3079)
* Making deadzones feel nice and smooth + adding rider files to .gitignore

* removing unnecessary parentheses and fixing possibility of divide by 0

* formatting :)

* fixing up ClampAxis

* fixing up ClampAxis
2024-02-22 19:16:15 -05:00
Berkan Diler
4cf03ee3b7 Use Enum and Delegate.CreateDelegate generic overloads (#3111)
* Use Enum generic overloads

* Remove EnumExtensions.cs

* Use Delegate.CreateDelegate generic overloads
2024-02-22 19:16:14 -05:00
merry
cb0fe89951 InstEmitMemory32: Literal loads always have word-aligned PC (#3104) 2024-02-22 19:16:14 -05:00
gdkchan
aa6bd6ab62 Fix missing geometry shader passthrough inputs (#3106)
* Fix missing geometry shader passthrough inputs

* Shader cache version bump
2024-02-22 19:16:14 -05:00
edisionnano
8ccb65d290 Ship SoundIO library only for the specified runtime (#3103)
* Add RuntimeIdentifers properties

For Linux, Windows and OS X x86-64
This ensures that the SoundIO project gets this property when built as a subproject

* Address gdkchan's nit

Merge tags into one
2024-02-22 19:16:14 -05:00
gdkchan
d35902eddb Add a limit on the number of uses a constant may have (#3097) 2024-02-22 19:16:14 -05:00
Mary
293e5f8c57 misc: Make PID unsigned long instead of long (#3043) 2024-02-22 19:16:14 -05:00
merry
f45537390e ARMeilleure: A32: Implement SHSUB8 and UHSUB8 (#3089)
* ARMeilleure: A32: Implement UHSUB8

* ARMeilleure: A32: Implement SHSUB8
2024-02-22 19:16:14 -05:00
wss445566
683292b8c7 fix headless sdl2 option string (#3093) 2024-02-22 19:16:14 -05:00
edisionnano
0d7132d9d8 Convert the bool to a lowercase string (#3080)
mesa_glthread doesn't accept PascalCase input
2024-02-22 19:16:14 -05:00
merry
a99949623e ARMeilleure: A32: Implement SHADD8 (#3086) 2024-02-22 19:16:14 -05:00
merry
3f780f84ea ARMeilleure: OpCodeTable: Add CMN (RsReg) (#3087) 2024-02-22 19:16:14 -05:00
Alex Barney
2fd7edb059 Try to ensure save data always has a valid owner ID (#3057)
- Run the extra data fix in FixExtraData on non-system saves that have no owner ID.
- Set the owner ID in the dummy application control property if an application doesn't have a proper one available.
2024-02-22 19:16:14 -05:00
Alex Barney
fe29bfce35 Fix the pronunciation of Ryujinx (#3059) 2024-02-22 19:16:14 -05:00
gdkchan
222682733e Fix bug that could cause depth buffer to be missing after clear (#3067) 2024-02-22 19:16:14 -05:00
VocalFan
74b943c317 Remove Appveyor from Readme and SLN (#3026)
* Replace Appveyor with Github badge.

* Delete appveyor.yml

* Remove Appveyor from SLN
2024-02-22 19:16:13 -05:00
gdkchan
d3cc1f5495 Fix small precision error on CPU reciprocal estimate instructions (#3061)
* Fix small precision error on CPU reciprocal estimate instructions

* PPTC version bump
2024-02-22 19:16:13 -05:00
Mary
010bb7f526 kernel: A bit of refactoring and fix GetThreadContext3 correctness (#3042)
* Start refactoring kernel a bit and import some changes from kernel decoupling PR

* kernel: Put output always at the start in Syscall functions

* kernel: Rewrite GetThreadContext3 to use a structure and to be accurate

* kernel: make KernelTransfer use generic types and simplify

* Fix some warning and do not use getters on MemoryInfo

* Address gdkchan's comment

* GetThreadContext3: use correct pause flag
2024-02-22 19:16:13 -05:00
riperiperi
d322e5c990 Add timestamp to 16-byte/4-word semaphore releases. (#3049)
* Add timestamp to 16-byte semaphore releases.

BOTW was reading a ulong 8 bytes after a semaphore return. Turns out this is the timestamp it was trying to do performance calculation with, so I've made it write when necessary.

This mode was also added to the DMA semaphore I added recently, as it is required by a few games. (i think quake?)

The timestamp code has been moved to GPU context. Check other games with an unusually low framerate cap or dynamic resolution to see if they have improved.

* Cast dma semaphore payload to ulong to fill the space

* Write timestamp first

Might be just worrying too much, but we don't want the applcation reading timestamp if it sees the payload before timestamp is written.
2024-02-22 19:16:13 -05:00
riperiperi
52e105d2b2 Fix res scale parameters not being updated in vertex shader (#3046)
This fixes an issue where the render scale array would not be updated when technically the scales on the flat array were the same, but the start index for the vertex scales was different.
2024-02-22 19:16:13 -05:00
edisionnano
be58636fbb Convert Octal-Mode to Decimal (#3041)
Apparently C# doesn't use 0 as a prefix like C does.
2024-02-22 19:16:13 -05:00
Mary
71a9e68dc5 Fix regression on PR builds version number since new release system 2024-02-22 19:16:13 -05:00
gdkchan
7792c57754 Fix calls passing V128 values on Linux (#3034)
* Fix calls passing V128 values on Linux

* PPTC version bump
2024-02-22 19:16:13 -05:00
Mary
944c0704e7 amadeus: Fix possible device sink input out of bound (#3032)
This fix an out of bound when indexing inputs for games that uses
unsupported values (8 here)

Close #2724.
2024-02-22 19:16:13 -05:00
Mary
ed1d46112a Set _vibrationPermitted to True by default (#2985)
Co-authored-by: SpookyBee123 <82302189+SpookyBee123@users.noreply.github.com>
2024-02-22 19:16:13 -05:00
gdkchan
dbf2f8e5ad Add support for BC1/2/3 decompression (for 3D textures) (#2987)
* Add support for BC1/2/3 decompression (for 3D textures)

* Optimize and clean up

* Unsafe not needed here

* Fix alpha value interpolation when a0 <= a1
2024-02-22 19:16:13 -05:00
Mary
949a7da612 Address comment from gdkchan: we are starting at 1.1.3 now 2024-02-22 19:16:13 -05:00
Mary
c0d1e94144 Add new release system
As AppVeyor took our project down and deleted it without any comments, we are switching to GitHub Releases earlier than anticipated.

This isn't the most elegant design (and I would have prefered having a release manifest in place) but this will do for now.

The concept of release channel was also defined with this change.

The new base version is now 1.1.x to avoid confusion with older system.

Standard test CI was disabled temporarly and may be chained later as a CI job after the release job.

Users are expected to redownload the emulator to be sure to be up to date.

PS: If someone from AppVeyor read this, thanks again for ruining my week-end, I will be sure to NEVER recommend you to anyone.

Best Regards, Mary.
2024-02-22 19:16:13 -05:00
riperiperi
9054fd730f Fix deadlock for GPU counter report when 0 draws are done (#3019)
This fixes a rare bug where reporting a counter for a region containing 0 draws could deadlock the GPU. If this write overlaps with a tracking action, then the GPU could end up waiting on something that it's meant to do in the future, so it would just get stuck.

Before, this reported immediately and wrote the result to guest memory (tracked) from the backend thread.

The backend thread cannot be allowed to trigger read actions that wait on the GPU, as it will end up waiting on itself, and never advancing.

In the case of backend multithreading's `SyncMap`, it would try to wait for a backend sync object that does not yet exist, as the sync object would exist according to the GPU and tracking, but it has not yet been created by the backend (and never will be, since it's stuck).

The fix is to queue the 0 draw event just like any other, its _bufferMap value is just forced to 0.

This affects games that use Conditional Rendering: SMO, Splatoon 2, MK8. Was generally indicated by a red message in log saying that the query result timed out after 5000 tries, but not always the cause.
2024-02-22 19:16:13 -05:00
gdkchan
f465319d73 Add host CPU memory barriers for DMB/DSB and ordered load/store (#3015)
* Add host CPU memory barriers for DMB/DSB and ordered load/store

* PPTC version bump

* Revert to old barrier order
2024-02-22 19:16:13 -05:00
gdkchan
68cf0390bc Stop using glTransformFeedbackVaryings and use explicit layout on the shader (#3012)
* Stop using glTransformFeedbackVarying and use explicit layout on the shader

* This is no longer needed

* Shader cache version bump

* Fix gl_PerVertex output for tessellation control shaders
2024-02-22 19:16:12 -05:00
gdkchan
d4e59d7226 Add capability for BGRA formats (#3011) 2024-02-22 19:16:12 -05:00
sharmander
1be087715d Implement FCVTNS (Scalar GP) (#2953)
* Implement FCVTNS (Scalar GP)

* Update Ptc Version
2024-02-22 19:16:12 -05:00
Ayato (Shahil)
3ff9822994 Readme overhaul (#2988)
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Address gdk feedback

* Address suggestion

Co-authored-by: Luke Warner <65521430+LukeWarnut@users.noreply.github.com>

* Address suggestion

Co-authored-by: Luke Warner <65521430+LukeWarnut@users.noreply.github.com>

* Address suggestion

Co-authored-by: Luke Warner <65521430+LukeWarnut@users.noreply.github.com>

* Address suggestion

Co-authored-by: Luke Warner <65521430+LukeWarnut@users.noreply.github.com>

* Address suggestion

Co-authored-by: Luke Warner <65521430+LukeWarnut@users.noreply.github.com>

* Update suggestion

Co-authored-by: SS <74042715+choppymaster@users.noreply.github.com>

* Update suggestion

Co-authored-by: SS <74042715+choppymaster@users.noreply.github.com>

* Update suggestion

Co-authored-by: SS <74042715+choppymaster@users.noreply.github.com>

* Update suggestion

Co-authored-by: SS <74042715+choppymaster@users.noreply.github.com>

* Update suggestion

Co-authored-by: SS <74042715+choppymaster@users.noreply.github.com>

* Address suggestion

Co-authored-by: SS <74042715+choppymaster@users.noreply.github.com>

* Address suggestion

Co-authored-by: SS <74042715+choppymaster@users.noreply.github.com>

* Address suggestion

Co-authored-by: SS <74042715+choppymaster@users.noreply.github.com>

* Address suggestion

Co-authored-by: SS <74042715+choppymaster@users.noreply.github.com>

* Update README.md

* Update README.md

Co-authored-by: Luke Warner <65521430+LukeWarnut@users.noreply.github.com>
Co-authored-by: SS <74042715+choppymaster@users.noreply.github.com>
2024-02-22 19:16:12 -05:00
gdkchan
34d737ac36 Scale scissor used for clears (#3002) 2024-02-22 19:16:12 -05:00
Mary
9e683366e8 kernel: Fix deadlock when pinning in interrupt handler (#2999)
* kernel: Fix deadlock when pinning in interrupt handler

This fix a deadlock on DoDonPachi Resurrection when starting a new game

* Address gdkchan's comment
2024-02-22 19:16:12 -05:00
gdkchan
f08ec98dc1 Fix return type mismatch on 32-bit titles (#3000) 2024-02-22 19:16:12 -05:00
Mary
902721a0bd ssl: Implement SSL connectivity (#2961)
* implement certain servicessl functions

* ssl: Implement more of SSL connection and abstract it

This adds support to non blocking SSL operations and unlink the SSL
implementation from the IPC logic.

* Rename SslDefaultSocketConnection to SslManagedSocketConnection

* Fix regression on Pokemon TV

* Address gdkchan's comment

* Simplify value read from previous commit

* ssl: some changes

- Implement builtin certificates parsing and retrieving
- Fix issues with SSL version handling
- Improve managed SSL socket error handling
- Ensure to only return a certificate on DoHandshake when actually requested

* Add missing BuiltInCertificateManager initialization call

* Address gdkchan's comment

* Address Ack's comment

Co-authored-by: InvoxiPlayGames <webmaster@invoxiplaygames.uk>
2024-02-22 19:16:12 -05:00
Mary
df54b729de bsd: Revamp API and make socket abstract (#2960)
* bsd: Revamp API and make socket abstract

This part of the code was really ancient and needed some love.
As such this commit aims at separating the socket core logic from the IClient class and make it uses more modern APIs to read/write/parse data.

* Address gdkchan's comment

* Move TryConvertSocketOption to WinSockHelper

* Allow reusing old fds and add missing locks around SocketInternal and ShutdownAllSockets

* bsd: ton of changes

- Make sockets per process
- Implement eventfds
- Rework Poll for support of eventfds
- Handle protocol auto selection by type (used by gRPC)
- Handle IPv6 socket creation

* Address most of gdkchan comments

* Fix inverted read logic for BSD socket read

* bsd: Make Poll abstract via IBsdSocketPollManager

* bsd: Improve naming of everything

* Fix build issue from last commit (missed to save on VC)

* Switch BsdContext registry to a concurrent dictionary

* bsd: Implement socket creation flags logic and the non blocking flag

* Remove unused enum from previous commit

* bsd: Fix poll logic when 0 fds are present for a given poll manager and when timeout is very small (or 0)

* Address gdkchan's comment
2024-02-22 19:16:12 -05:00
Mary
551c3f8503 sfdnsres: Fix serialization issues (#2992)
* sfdnsres: Fix serialization issues

Fix a crash on Monster Hunter Rise

* Address gdkchan's comments

* Address gdkchan's comments
2024-02-22 19:16:12 -05:00
Alex Barney
91152f405d Update to LibHac 0.15.0 (#2986) 2024-02-22 19:16:12 -05:00
gdkchan
de2a3e40ff Fix render target clear when sizes mismatch (#2994) 2024-02-22 19:16:11 -05:00
riperiperi
15ce6aa2cd Fix adjacent 3d texture slices being detected as Incompatible Overlaps (#2993)
This fixes some regressions caused by #2971 which caused rendered 3D texture data to be lost for most slices. Fixes issues with Xenoblade 2's colour grading, probably a ton of other games.

This also removes the check from TextureCache, making it the tiniest bit smaller (any win is a win here).
2024-02-22 19:16:11 -05:00
Mary
3a5d8f4890 account: Rework LoadIdTokenCache to auto generate a random JWT token (#2991)
This improve correctness of that call while possibly spoofing possible recognizable patterns.
2024-02-22 19:16:11 -05:00
Mary
5f86f4ba82 sfdnsres: Block communication attempt with NPLN servers (#2990)
Seen on Monster Hunter Rise.
2024-02-22 19:16:11 -05:00