Commit graph

2882 commits

Author SHA1 Message Date
Valentin PONS
4e4321166d Implements some 32-bit instructions (VBIC, VTST, VSRA) (#1192)
* Added some 32 bits instructions:

* VBIC
* VTST
* VSRA

* Incremented the PTC

* Add tests and fix implementation

* Fixed VBIC immediate opcode mapping

* Hey hey!

* Nit.

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Co-authored-by: LDj3SNuD <dvitiello@gmail.com>
Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
2024-02-22 19:15:07 -05:00
gdkchan
968d5d5f8e Do not print guest stack trace for svcBreak debug calls (#1398) 2024-02-22 19:15:07 -05:00
LDj3SNuD
7ad4431c0c CPU: A32: Fix Vabs_V & Vneg_V (S8, S16, S32 & F32); add Tests. (#1394)
* Fix Vabs_V & Vneg_V (S8, S16, S32 & F32); add Tests.

* Update Ptc.cs
2024-02-22 19:15:07 -05:00
gdkchan
776f52f0f6 Improve kernel WaitSynchronization syscall implementation (#1362) 2024-02-22 19:15:06 -05:00
LDj3SNuD
6edce4c394 CPU: A32: Add Vadd & Vsub Wide (S/U_8/16/32) Inst.s with Test. (#1390) 2024-02-22 19:15:06 -05:00
gdkchan
ed4ca34a99 Improve kernel IPC related syscalls (#1379)
* Implement session count decrement when the handle is closed

* Remove unused field

* Implement SendSyncRequestWithUserBuffer, SendAsyncRequestWithUserBuffer and ReplyAndReceiveWithUserBuffer syscalls

* Nits

* Fix swapped copy dst/src

* Add missing pointer buffer descriptor write on reply

* Fix IPC unaligned buffer copy and restoring client attributes on reply

* Oops

* Fix SetIpcMappingPermission

* Fix unaligned copy bugs

* Free memory used for temporary IPC buffers
2024-02-22 19:15:06 -05:00
gdkchan
b0113f52e5 Fix resource limit reserve taking too long (#1391) 2024-02-22 19:15:06 -05:00
gdkchan
e3add77350 Force TFB rebind after buffer modifications (#1392) 2024-02-22 19:15:06 -05:00
Ficture Seven
8ad0ba6103 Fix Decode exception condition (#1377) 2024-02-22 19:15:06 -05:00
gdkchan
9d48ba58b3 Initial transform feedback support (#1370)
* Initial transform feedback support

* Some nits and fixes

* Update ReportCounterType and Write method

* Can't change shader or TFB bindings while TFB is active

* Fix geometry shader input names with new naming
2024-02-22 19:15:06 -05:00
mageven
af9fed75f9 mods: Fix crash when loading via LoadCart (#1388) 2024-02-22 19:15:06 -05:00
gdkchan
c6b3fff4cb Fix depth stencil formats copy by matching equivalent color formats (#1198) 2024-02-22 19:15:06 -05:00
LDj3SNuD
a37bff164e Add Fmax/minv_V & S/Ushl_S Inst.s with Tests. Fix Maxps/d & Minps/d d… (#1335)
* Add Fmax/minv_V & S/Ushl_S Inst.s with Tests. Fix Maxps/d & Minps/d double zero sign handling. Allows better handling of NaNs.

* Optimized EmitSse2VectorIsNaNOpF() for multiple uses per opF.
2024-02-22 19:15:06 -05:00
riperiperi
787f47a637 Add SSE4.2 Path for CRC32, add A32 variant, add tests for non-castagnoli variants. (#1328)
* Add CRC32 A32 instructions.

* Fix CRC32 instructions.

* Add CRC intrinsic and fast path.

Loop is currently unrolled, will look into adding temp vars after tests are added.

* Begin work on Crc tests

* Fix SSE4.2 path for CRC32C, finialize tests.

* Remove unused IR path.

* Fix spacing between prefix checks.

* This should be Src.

* PTC Version

* OpCodeTable Order

* Integer check improvement. Value and Crc can be either 32 or 64 size.

* This wasn't necessary...

* If size is 3, value type must be I64.

* Fix same src+dest handling for non crc intrinsics.

* Pre-fix (ha) issue with vex encodings
2024-02-22 19:15:06 -05:00
Ficture Seven
e7ce74a4cf Fix Node Uses/Assignments (#1376)
* Fix Node Uses/Assignments

* Bump PPTC Version Number

Co-authored-by: jduncanator <1518948+jduncanator@users.noreply.github.com>
2024-02-22 19:15:06 -05:00
Ficture Seven
c9ce656fec Fix folding of ConvertI64ToI32 imm64 (#1383)
* Fix folding of ConvertI64ToI32 imm64

* Increment PTC internal version

* Clean up
2024-02-22 19:15:06 -05:00
EmulationFanatic
46e3bbfb76 Added graphics enhancements and dlc/mods info. (#1385) 2024-02-22 19:15:05 -05:00
gdkchan
b961220176 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>
2024-02-22 19:15:05 -05:00
gdkchan
c5866b5c0b Mask shift constants on x86 backend (#1382)
* Mask shift constants on x86 backendd

* Version bump
2024-02-22 19:15:04 -05:00
Ficture Seven
0774778c45 Fold ZeroExtend8/16/32 imm32/64 (#1358)
* Fold ZeroExtend8/16/32 imm32/64

* Increment PTC version
2024-02-22 19:15:04 -05:00
Ficture Seven
147ae7a9ed Fold ConvertI64ToI32 imm64 (#1359)
* Fold ConvertI64ToI32 imm64

* Increment PTC version

* Bump PPTC InternalVersion

Co-authored-by: jduncanator <1518948+jduncanator@users.noreply.github.com>
2024-02-22 19:15:04 -05:00
riperiperi
b4077348ca Implement Logical Operation registers and functionality (#1380)
* Implement Logical Operation registers and functionality.

* Address Feedback 1
2024-02-22 19:15:04 -05:00
mageven
534f319a7f 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
2024-02-22 19:15:04 -05:00
LDj3SNuD
8d2436f04c Fix PPTC on Windows 7. (#1369)
* Fix PPTC on Windows 7.

* Address gdkchan comment.
2024-02-22 19:15:04 -05:00
riperiperi
4a152d4574 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.
2024-02-22 19:15:04 -05:00
Mary
5db35e40e0 prepo: Update implementation for 10.x changes (#1361)
* prepo: Update implementation for 10.x changes

On 10.x, Nintendo changed yet another time the prepo SaveReport &
SaveReportWithUser command ids.

This PR add support for command 10104 & 10105 and update naming of the
old variants to match switchbrew.

* Fix misalign and remove a ToString

* Address jD's comment
2024-02-22 19:15:04 -05:00
Mary
65d66af152 Readd SoundIO as OpenAL fallback (#1356) 2024-02-22 19:15:04 -05:00
Mary
074582f550 Fix compilation warnings and use new LibHac APIs for executable loading (#1350)
* Fix compilation warnings and use new LibHac APIs for executable loading

* Migrate NSO loader to the new reader and fix kip loader

* Fix CS0162 restore

* Remove extra return lines

* Address Moose's comment
2024-02-22 19:15:04 -05:00
gdkchan
6c30b282d1 Implement shader LEA instruction and improve bindless image load/store (#1355) 2024-02-22 19:15:04 -05:00
gdkchan
d4d55068cd Fix buffer to 3D texture copy (#1354) 2024-02-22 19:15:03 -05:00
Xpl0itR
826e2866ee Changes to game list reloading (#1334)
* Only reload list when game dirs are changed

* do not reload game list when game is loaded
2024-02-22 19:15:03 -05:00
Xpl0itR
c691217bee 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
2024-02-22 19:15:03 -05:00
Sera
6bf83e3aca 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
2024-02-22 19:15:03 -05:00
Sera
e7607f74da 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
2024-02-22 19:15:03 -05:00
mageven
3d7a8fd8c8 Stub nifm IRequest GetAppletInfo (#1326)
* Stub GetAppletInfo to be consistent with GetResult

* Fix formatting and enum

* Update and use ResultCode
2024-02-22 19:15:03 -05:00
gdkchan
010f241e03 Support inline index buffer data (#1351)
* Support inline index buffer data

* Sort usings
2024-02-22 19:15:03 -05:00
gdkchan
509eaae1b8 Fix compute restore of previous shader state (#1352) 2024-02-22 19:15:03 -05:00
gdkchan
7d9c2a393a Call syncpoint expiration callback outside of the lock (#1349) 2024-02-22 19:15:03 -05:00
Mary
751556cfc6 sockets: Make sure to write the receivedBuffer (#1346)
Fix #1341
2024-02-22 19:15:03 -05:00
gdkchan
0f0c3ca720 Remove dummy LLE project (#1336) 2024-02-22 19:15:03 -05:00
Xpl0itR
61907f91ae 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
2024-02-22 19:15:03 -05:00
riperiperi
00ef73d68c Fix VMVN (immediate), Add VPMIN, VPMAX, VMVN (register) (#1303)
* Add Vmvn (register), tests for both Vmvn variants.

* Add Vpmin, Vpmax, improve Non-FastFp accuracy for Vpadd

* Rebase on top of PTC.

* Add Nopcode

* Increment PTC version.

* Fix nits.
2024-02-22 19:15:03 -05:00
Xpl0itR
7cd48d493c Import DLC title key from ticket when loading into content manager (#1318) 2024-02-22 19:15:03 -05:00
Thog
259e765586 Remove profiled build task from AppVeyor (#1319)
As it was removed on the website on fb46709fda, we don't need to build it anymore.

This also cut the build time and allow us more flexibility for hotfixes if needed.
2024-02-22 19:15:03 -05:00
Xpl0itR
61cd49afa3 Implement dlc management window (#1313)
* Implement dlc management window

* reduce repetition

* Implement per NCA toggling of DLC rather than per container
2024-02-22 19:15:03 -05:00
Xpl0itR
da33a2f14e Copy the value of InputConfig to a new array before iterating (#1271) 2024-02-22 19:15:03 -05:00
gdkchan
56076e0dbf Fix regression caused by wrong SB descriptor offset (#1316) 2024-02-22 19:15:03 -05:00
VolcaEM
ab64df2bc4 Update NRR structs (#1291)
* Update NRR structs

This was based on Switchbrew page: switchbrew.org/wiki/NRR

* Address review comments
2024-02-22 19:15:03 -05:00
mageven
0c3e416db3 Implement aoc:u and support loading AddOnContent (#1221)
* Initial rebased AddOnContent support

* Fix bounds calculation
* Use existing GameCard in VFS per Xpl0itR's suggestion
+ Add dummy IPurchaseEventManager per AcK's suggestion

* Support multiple containers

* Add option to selectively disable addons

* Import tickets from AOC FS

* Load all nsps in base directory automatically

* Revert LoadNsp renaming

Removes conflicts with Mods PR. Not much is lost, old names were fine.

* Address AcK's comments

* Address Thog's comments

Dispose opened nsp files
Fix potential bug by clearing metadata on load
2024-02-22 19:15:02 -05:00
EmulationFanatic
c379a37c01 Update README.md (#1302)
* General updating/cleanup

* Fixed firmware wording and unnecessary capitalization

* Removed superfluous asterisk

* Address Thog's comments, add config.json path

* Fix line break

* Address riperiperi's comments

* Update screenshot to match Ryujinx.org website

* Added PPTC blurb

* Address gdkchan's comments

* Clarify audio support

* Fix line break

* Remove extra .

* Address Thog's comments

Removed a few spaces on line 59

* Removed even more spaces.
2024-02-22 19:15:02 -05:00