Commit graph

1207 commits

Author SHA1 Message Date
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
Thog
59f4490e22 Increment PTC version (#1311)
Fix issues caused by 2421186d97
2024-02-22 19:15:02 -05:00
Ficture Seven
9eca28857c Generalize tail continues (#1298)
* Generalize tail continues

* Fix DecodeBasicBlock

`Next` and `Branch` would be null, which is not the state expected by
the branch instructions. They end up branching or falling into a block
which is never populated by the `Translator`. This causes an assert to
be fired when building the CFG.

* Clean up Decode overloads

* Do not synchronize when branching into exit block

If we're branching into an exit block, that exit block will tail
continue into another translation which already has a synchronization.

* Remove A32 predicate tail continue

If `block` is not an exit block then the `block.Next` must exist (as
per the last instruction of `block`).

* Throw if decoded 0 blocks

Address gdkchan's feedback

* Rebuild block list instead of setting to null

Address gdkchan's feedback
2024-02-22 19:15:02 -05:00
LDj3SNuD
ce57dc3f5e Add Profiled Persistent Translation Cache. (#769)
* Delete DelegateTypes.cs

* Delete DelegateCache.cs

* Add files via upload

* Update Horizon.cs

* Update Program.cs

* Update MainWindow.cs

* Update Aot.cs

* Update RelocEntry.cs

* Update Translator.cs

* Update MemoryManager.cs

* Update InstEmitMemoryHelper.cs

* Update Delegates.cs

* Nit.

* Nit.

* Nit.

* 10 fewer MSIL bytes for us

* Add comment. Nits.

* Update Translator.cs

* Update Aot.cs

* Nits.

* Opt..

* Opt..

* Opt..

* Opt..

* Allow to change compression level.

* Update MemoryManager.cs

* Update Translator.cs

* Manage corner cases during the save phase. Nits.

* Update Aot.cs

* Translator response tweak for Aot disabled. Nit.

* Nit.

* Nits.

* Create DelegateHelpers.cs

* Update Delegates.cs

* Nit.

* Nit.

* Nits.

* Fix due to #784.

* Fixes due to #757 & #841.

* Fix due to #846.

* Fix due to #847.

* Use MethodInfo for managed method calls.

Use IR methods instead of managed methods about Max/Min (S/U).
Follow-ups & Nits.

* Add missing exception messages.

Reintroduce slow path for Fmov_Vi.
Implement slow path for Fmov_Si.

* Switch to the new folder structure.

Nits.

* Impl. index-based relocation information. Impl. cache file version field.

* Nit.

* Address gdkchan comments.

Mainly:
- fixed cache file corruption issue on exit; - exposed a way to disable AOT on the GUI.

* Address AcK77 comment.

* Address Thealexbarney, jduncanator & emmauss comments.

Header magic, CpuId (FI) & Aot -> Ptc.

* Adaptation to the new application reloading system.

Improvements to the call system of managed methods.
Follow-ups.
Nits.

* Get the same boot times as on master when PTC is disabled.

* Profiled Aot.

* A32 support (#897).

* #975 support (1 of 2).

* #975 support (2 of 2).

* Rebase fix & nits.

* Some fixes and nits (still one bug left).

* One fix & nits.

* Tests fix (by gdk) & nits.

* Support translations not only in high quality and rejit.

Nits.

* Added possibility to skip translations and continue execution, using `ESC` key.

* Update SettingsWindow.cs

* Update GLRenderer.cs

* Update Ptc.cs

* Disabled Profiled PTC by default as requested in the past by gdk.

* Fix rejit bug. Increased number of parallel translations. Add stack unwinding stuffs support (1 of 2).

Nits.

* Add stack unwinding stuffs support (2 of 2). Tuned number of parallel translations.

* Restored the ability to assemble jumps with 8-bit offset when Profiled PTC is disabled or during profiling.

Modifications due to rebase.
Nits.

* Limited profiling of the functions to be translated to the addresses belonging to the range of static objects only.

* Nits.

* Nits.

* Update Delegates.cs

* Nit.

* Update InstEmitSimdArithmetic.cs

* Address riperiperi comments.

* Fixed the issue of unjustifiably longer boot times at the second boot than at the first boot, measured at the same time or reference point and with the same number of translated functions.

* Implemented a simple redundant load/save mechanism.

Halved the value of Decoder.MaxInstsPerFunction more appropriate for the current performance of the Translator.
Replaced by Logger.PrintError to Logger.PrintDebug in TexturePool.cs about the supposed invalid texture format to avoid the spawn of the log.
Nits.

* Nit.

Improved Logger.PrintError in TexturePool.cs to avoid log spawn.
Added missing code for FZ handling (in output) for fp max/min instructions (slow paths).

* Add configuration migration for PTC

Co-authored-by: Thog <me@thog.eu>
2024-02-22 19:15:02 -05:00
riperiperi
a8fff72c30 VABS takes one input register, not two. (#1300) 2024-02-22 19:15:02 -05:00
riperiperi
42b87695b9 Optimize texture format conversion, and MethodCopyBuffer (#1274)
* Improve performance when converting texture formats.

Still more work to do.

* Speed up buffer -> texture copies.

No longer copies byte by byte. Fast path when formats are identical.

* Fix a few things, 64 byte block fast copy.

* Spacing cleanup, unrelated change.

* Fix base offset calculation for region copies.

* Fix Linear -> BlockLinear

* Fix some nits. (part 1 of review feedback)

* Use a generic version of the Convert* functions rather than lambdas.

This is some real monkey's paw shit.

* Remove unnecessary span constructor.

* Revert "Use a generic version of the Convert* functions rather than lambdas."

This reverts commit aa43dcfbe8.

* Fix bug with rectangle destination writing, better rectangle calculation for linear textures.
2024-02-22 19:15:02 -05:00
mageven
213e995638 Change console log to discard on overflow (#1241) 2024-02-22 19:15:02 -05:00
Shrek5InTheatres2019
90fd7a99d7 Stubbing ImportServerPki (#1281)
* Stubbed ImportServerPki

* thought it might be nice to name this variable properly

* i really need to name variables better

* Change Var

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

* Change .ReadBytes(5) to IPC send buffer

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

* Add description comment

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

* fix build issue

* Resolve final suggestion

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

* uhh

* it should work now shut up

* aligned variables just look so much nicer :)

* better variable alignment

* aligned

Co-authored-by: Thog <thog@protonmail.com>
2024-02-22 19:15:02 -05:00
merry
9a846f739d Faster crc32 implementation (#1294)
* Add Pclmulqdq intrinsic

* Implement crc32 in terms of pclmulqdq

* Address PR comments
2024-02-22 19:15:02 -05:00
Thog
61a8e0d285 SurfaceFlinger: fix some bugs (#1262)
* SurfaceFlinger: fix some bugs

This fixes some bugs in the current implementation and make it closer to
the real implementation.

* Fix align of some variables
2024-02-22 19:15:02 -05:00
gdkchan
1e0b2226b7 Implement FIFO semaphore (#1286)
* Implement FIFO semaphore

* New enum for FIFO semaphore operation
2024-02-22 19:15:01 -05:00
gdkchan
99da86d638 Add new depth-stencil formats (#1284) 2024-02-22 19:15:01 -05:00
gdkchan
73c08482db Fix wrong face culling once and for all (#1277)
* Viewport swizzle support on NV and clip origin

* Initialize default viewport swizzle state, emulate viewport swizzle on shaders when not supported

* Address PR feedback
2024-02-22 19:15:01 -05:00
LDj3SNuD
55765f6866 Add FMaxNmV & FMinNmV Inst.s with Test. (#1279)
Successful unit testing on Windows (debug and release mode).
2024-02-22 19:15:01 -05:00
gdkchan
3da08dbf76 Support separate textures and samplers (#1216)
* Support separate textures and samplers

* Add missing bindless flag, fix SNORM format on buffer textures

* Add missing separation

* Add comments about the new handles
2024-02-22 19:15:01 -05:00
gdkchan
deb1c7b8af Omit image format if possible, and fix BA bit (#1280)
* Omit image format if possible, and fix BA bit

* Match extension name
2024-02-22 19:15:01 -05:00
mageven
e10fb6c592 Fix GetDesiredLanguage (#1275)
* Fix GetDesiredLanguage

* Correct tzcnt slip-up

* Address gdkchan's comments
2024-02-22 19:15:01 -05:00
mageven
29217448a6 Fix GetDisplayVersion (#1276) 2024-02-22 19:15:01 -05:00
riperiperi
8507600a5e Flush GL commands before inevitably waiting for a query result. (#1278) 2024-02-22 19:15:01 -05:00
riperiperi
1898e64ae3 Remember bound framebuffer to avoid glGetInteger use. (#1273)
glGetInteger seems to sync with GPU which is less than ideal, and slowing down texture copies.
2024-02-22 19:15:01 -05:00
mageven
6dd3202470 Implement CNTVCT_EL0 (#1268)
* Implement CNTVCT_EL0

* Fix comment
2024-02-22 19:15:01 -05:00
Thog
c2292223d4 Implement TMML and TMML.B (#1270)
* Implement TMML and TMML.B

This implement TMML and TMML.B instructions

* Fix TmmlB declaration alignment

* Address gdkchan's comments

* Fix inverted encoding definitions
2024-02-22 19:15:01 -05:00
gdkchan
61363b833c Spanify Graphics Abstraction Layer (#1226)
* Spanify Graphics Abstraction Layer

* Be explicit about BufferHandle size
2024-02-22 19:15:01 -05:00
Thog
1c3b6ea58c time: Make sure to initialize the network system clock with a valid system clock (#1259)
This should fix AC:NH events and probably other games.
2024-02-22 19:15:01 -05:00
Alex Barney
a7a574acea Update to LibHac 0.11.2 (#1240) 2024-02-22 19:15:01 -05:00
LDj3SNuD
791cff51ab Unwinding Follow-up. Fix a bug in JitUnwindWindows where ... (#1238)
... in case of "Vector" unwind codes the remaining unwind codes could be corrupted.
Nits.
2024-02-22 19:15:01 -05:00